/* Prima Project OS - design system layer.
   Loaded after main.css on every workspace page: login, onboarding, home,
   admin, punch station, change password. This file is the single source of
   visual truth - tokens, type scale, surfaces, controls, data display and
   page chrome. It changes colour, type, spacing, borders, radii and states
   only; layout grids and behaviour stay in main.css so screens keep working
   exactly as before. */

/* ============================================================
   1. Tokens
   ============================================================ */

:root {
    --font-heading: "Space Grotesk", "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, sans-serif;

    --bg: #f5f7f6;
    --bg-strong: #eef2f0;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --panel-muted: #f7f9f8;

    --ink: #14231c;
    --ink-soft: #64756d;
    --ink-faint: #8b9a93;

    --accent: #0f6b41;
    --accent-dark: #0a5333;
    --accent-soft: rgba(15, 107, 65, 0.1);
    --accent-line: rgba(15, 107, 65, 0.28);
    --warm: #9a6b28;
    --warm-soft: rgba(154, 107, 40, 0.12);
    --danger: #a63535;
    --danger-soft: rgba(166, 53, 53, 0.1);
    --success: #0d6b3d;

    --line: rgba(20, 35, 28, 0.1);
    --line-strong: rgba(20, 35, 28, 0.16);

    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;

    --shadow-xs: 0 1px 2px rgba(20, 35, 28, 0.05);
    --shadow-sm: 0 1px 2px rgba(20, 35, 28, 0.05), 0 6px 16px rgba(20, 35, 28, 0.05);
    --shadow-md: 0 2px 4px rgba(20, 35, 28, 0.06), 0 16px 36px rgba(20, 35, 28, 0.1);
    --shadow: var(--shadow-sm);

    --control-height: 38px;
    --control-height-sm: 30px;
    --focus-ring: 0 0 0 3px rgba(15, 107, 65, 0.14);
    --transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

/* ============================================================
   2. Base
   ============================================================ */

html {
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.94rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(15, 107, 65, 0.16);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(20, 35, 28, 0.24) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(20, 35, 28, 0.2);
    background-clip: content-box;
}

:focus-visible {
    outline: 2px solid rgba(15, 107, 65, 0.5);
    outline-offset: 2px;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-dark);
}

/* ============================================================
   3. Typography
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.015em;
    color: var(--ink);
}

h1 { font-size: 1.55rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: 0.94rem; }

p {
    line-height: 1.55;
}

.eyebrow,
.section-label,
.signal-card__label,
.hero__switcher-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.section-heading h2 {
    margin: 0.15rem 0 0;
    font-size: 1.16rem;
    line-height: 1.25;
    letter-spacing: -0.012em;
}

.section-heading--compact {
    margin-bottom: 0.7rem;
}

.section-heading__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.section-support {
    max-width: 62ch;
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.5;
}

.section-divider {
    height: 1px;
    margin: 1rem 0;
    border: 0;
    background: var(--line);
}

.field-note,
.input-note {
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
}

.stat-card__value,
.signal-card strong {
    font-family: var(--font-heading);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ============================================================
   4. Page chrome
   ============================================================ */

.page-shell {
    padding-top: 1rem;
}

.hero {
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.hero::after {
    content: none;
}

.hero h1 {
    max-width: 26ch;
    margin-top: 0.5rem;
    font-size: clamp(1.5rem, 2.3vw, 1.95rem);
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.hero__text {
    max-width: 68ch;
    margin-top: 0.6rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.6;
}

.hero__actions,
.hero__toolbar {
    margin-top: 1rem;
    gap: 0.6rem;
}

.hero__switcher {
    display: grid;
    gap: 0.3rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel-muted);
}

.hero__switcher strong {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.25;
}

/* Topbar: one clean bar on every page */

.topbar {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-xs);
}

.topbar--home-app,
.topbar--admin-app {
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-xs);
    gap: 0.75rem;
}

.topbar__brand {
    gap: 0.5rem;
    align-items: center;
}

.topbar__brand-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.topbar__brand h1 {
    font-size: 1.1rem;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.topbar__brand--home-app .topbar__brand-copy strong,
.home-shell__brand-copy strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    line-height: 1.15;
    color: var(--ink);
}

.topbar__brand--home-app .topbar__brand-copy span,
.home-shell__brand-copy span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.2;
}

.topbar__search--home,
.topbar__search--admin {
    min-height: var(--control-height);
    padding: 0 0.8rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel-muted);
    box-shadow: none;
    transition: var(--transition);
}

.topbar__search--home:focus-within,
.topbar__search--admin:focus-within {
    border-color: var(--accent);
    background: var(--panel);
    box-shadow: var(--focus-ring);
}

.topbar__search--home input,
.topbar__search--admin input {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
}

.topbar__search--home input::placeholder,
.topbar__search--admin input::placeholder {
    color: var(--ink-faint);
}

.topbar__search-icon {
    color: var(--ink-faint);
}

.topbar__search-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.topbar__account-actions {
    gap: 0.5rem;
}

/* Auth screens */

.auth-shell {
    min-height: calc(100vh - 4rem);
}

.auth-card {
    width: min(430px, 100%);
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-md);
}

/* Never squeeze the onboarding wizard, which sets its own width. */
.auth-card:not(.auth-card--onboarding) {
    width: min(430px, 100%);
}

.auth-card__logo {
    width: auto;
    height: 30px;
    margin-bottom: 1.1rem;
}

.auth-card h1 {
    margin-top: 0.35rem;
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.auth-form,
.auth-help {
    margin-top: 1.35rem;
}

/* Workspace canvas */

.workspace-shell__content {
    gap: 0.9rem;
}

.workspace-shell__content-header {
    padding: 0.15rem 0.15rem 0;
}

.workspace-shell__content-copy h2 {
    font-size: 1.45rem;
    line-height: 1.2;
    letter-spacing: -0.018em;
}

.workspace-shell__workbench {
    padding: 0 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-xs);
}

.workspace-shell__section-stack {
    gap: 0.9rem;
}

.workspace-shell__section {
    gap: 0.75rem;
}

/* ============================================================
   5. Navigation
   ============================================================ */

.home-shell__rail,
.admin-shell__rail {
    gap: 0.25rem;
    background: linear-gradient(180deg, #0d3a22 0%, #082a18 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.home-shell__rail-button,
.admin-shell__rail-button {
    gap: 0.28rem;
    padding: 0.5rem 0.15rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.72);
    transition: var(--transition);
}

.home-shell__rail-button:hover,
.admin-shell__rail-button:hover,
.home-shell__rail-button:focus-visible,
.admin-shell__rail-button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: none;
    outline: none;
}

.home-shell__rail-button--active,
.admin-shell__rail-button--active {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.home-shell__rail-icon,
.admin-shell__rail-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
}

.home-shell__rail-button--active .home-shell__rail-icon,
.admin-shell__rail-button--active .admin-shell__rail-icon {
    background: rgba(255, 255, 255, 0.16);
}

.home-shell__rail-icon svg,
.admin-shell__rail-icon svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.7;
}

.home-shell__rail-label,
.admin-shell__rail-label {
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.1;
}

.home-shell__brand-mark,
.home-shell__brand-chip,
.admin-shell__brand-mark {
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
}

.home-shell__mobile-bar {
    background: linear-gradient(180deg, #0d3a22 0%, #082a18 100%);
    box-shadow: 0 8px 20px rgba(8, 42, 24, 0.22);
}

.home-shell__mobile-drawer {
    padding: 1rem;
    border: 1px solid var(--line);
    border-top-left-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-md);
}

.home-shell__mobile-drawer-header strong {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--ink);
}

.home-shell__mobile-menu-item,
.home-shell__mobile-link {
    min-height: 42px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.admin-shell__panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-xs);
}

.admin-shell__panel-header {
    border-bottom: 1px solid var(--line);
}

/* Account menu */

.account-menu__dropdown {
    min-width: 260px;
    gap: 0.6rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-md);
}

.account-menu__identity {
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.account-menu__identity strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    line-height: 1.2;
}

.account-menu__link,
.account-menu__action {
    min-height: 38px;
    padding: 0.5rem 0.7rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
}

.account-menu__link:hover,
.account-menu__link:focus-visible,
.account-menu__action:hover,
.account-menu__action:focus-visible {
    border-color: var(--line);
    background: var(--bg-strong);
    transform: none;
    outline: none;
}

.account-menu__action--disconnect {
    color: var(--danger);
}

.account-menu__action--disconnect:hover,
.account-menu__action--disconnect:focus-visible {
    border-color: rgba(166, 53, 53, 0.22);
    background: var(--danger-soft);
}

/* ============================================================
   6. Surfaces
   ============================================================ */

.card,
.signal-card,
.stat-card,
.employee-card,
.insight,
.integration-item,
.admin-card {
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-xs);
    backdrop-filter: none;
}

.signal-card--secondary {
    background: var(--panel-muted);
    border-color: var(--line);
}

.signal-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.6rem;
}

.signal-card p,
.employee-card p,
.integration-item p,
.insight p {
    margin-top: 0.35rem;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.stat-card {
    display: grid;
    gap: 0.15rem;
    padding: 1rem 1.05rem;
}

.stat-card__value,
.stat-card strong {
    margin-top: 0.3rem;
    font-size: 1.45rem;
    line-height: 1.15;
}

.stat-card__note {
    margin-top: 0.3rem;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.employee-card h3,
.integration-item h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
}

.employee-card__meta,
.integration-item__meta,
.insight__meta {
    margin-top: 0.7rem;
    gap: 0.4rem;
}

.stats-grid,
.content-grid,
.list-grid,
.integration-list,
.insight-list {
    gap: 0.85rem;
}

.filter-grid {
    gap: 0.7rem;
}

.empty-state {
    padding: 1.75rem 1.25rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--panel-muted);
    color: var(--ink-soft);
    font-size: 0.88rem;
    text-align: center;
}

.app-banner {
    margin-bottom: 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(166, 53, 53, 0.22);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-sm);
    background: #fdf6f5;
    color: #7c2727;
    font-size: 0.88rem;
    line-height: 1.45;
}

/* ============================================================
   7. Controls
   ============================================================ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: var(--control-height);
    padding: 0 0.95rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0;
    transition: var(--transition);
}

.button:hover {
    transform: none;
}

.button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.button:disabled,
.button[disabled] {
    opacity: 0.5;
    box-shadow: none;
    cursor: not-allowed;
}

.button--primary {
    border-color: transparent;
    background: var(--accent);
    color: #ffffff;
    box-shadow: var(--shadow-xs);
}

.button--primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 2px 8px rgba(20, 35, 28, 0.14);
}

.button--ghost {
    border-color: var(--line-strong);
    background: var(--panel);
    color: var(--ink);
}

.button--ghost:hover {
    border-color: rgba(20, 35, 28, 0.24);
    background: var(--bg-strong);
}

.button--danger {
    border-color: rgba(166, 53, 53, 0.24);
    background: var(--danger-soft);
    color: var(--danger);
}

.button--danger:hover {
    border-color: rgba(166, 53, 53, 0.34);
    background: rgba(166, 53, 53, 0.14);
}

.button--pill {
    min-height: var(--control-height-sm);
    padding: 0 0.75rem;
    font-size: 0.82rem;
    box-shadow: none;
}

.button--icon {
    min-width: var(--control-height);
    padding: 0 0.6rem;
}

.button--icon svg {
    width: 1.05rem;
    height: 1.05rem;
    stroke-width: 1.8;
}

/* Fields: one height, border, radius and focus ring everywhere */

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea,
.stack-form input,
.stack-form select,
.stack-form textarea,
.stack-form--employee input,
.stack-form--employee select,
.stack-form--employee textarea {
    width: 100%;
    min-height: var(--control-height);
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    transition: var(--transition);
}

textarea {
    min-height: 5rem;
    resize: vertical;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus,
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
    border-color: var(--accent);
    background: var(--panel);
    box-shadow: var(--focus-ring);
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--ink-faint);
}

input[readonly],
.stack-form input[readonly],
.stack-form input:disabled,
.stack-form select:disabled {
    background: var(--panel-muted);
    color: var(--ink-soft);
}

.stack-form {
    gap: 0.7rem;
}

.stack-form label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink-soft);
}

.stack-form--employee label,
.stack-form--project label {
    font-size: 0.78rem;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
}

/* ============================================================
   8. Data display
   ============================================================ */

table th,
table td {
    border-color: var(--line);
    vertical-align: middle;
}

table thead th,
thead th {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--line);
    background: var(--panel-muted);
    color: var(--ink-faint);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

[class$="-table"]:not([class*="parts-catalog"]) tbody td {
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
}

table tbody tr:hover,
tbody tr:hover {
    background: rgba(15, 107, 65, 0.035);
}

table tbody tr:last-child td {
    border-bottom: 0;
}

/* Pills and status badges share one shape */

.pill,
[class$="-pill"] {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.16rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-muted);
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.4;
    white-space: nowrap;
}

.pill--good,
[class$="-pill--good"] {
    border-color: rgba(13, 107, 61, 0.22);
    background: rgba(13, 107, 61, 0.1);
    color: var(--success);
}

.pill--warn,
[class$="-pill--warn"] {
    border-color: rgba(154, 107, 40, 0.24);
    background: var(--warm-soft);
    color: #7d551d;
}

.pill--risk,
.pill--danger,
[class$="-pill--risk"] {
    border-color: rgba(166, 53, 53, 0.24);
    background: var(--danger-soft);
    color: var(--danger);
}

.pill--muted {
    border-color: var(--line);
    background: var(--panel-muted);
    color: var(--ink-soft);
}

/* ============================================================
   9. Overlays
   ============================================================ */

.modal__backdrop {
    background: rgba(12, 26, 20, 0.42);
    backdrop-filter: blur(4px);
}

.modal__panel {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    box-shadow: var(--shadow-md);
}

.modal__header {
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.modal__panel h2,
.modal__header h2 {
    font-size: 1.12rem;
}

/* ============================================================
   10. Parts catalog: compact layout (kept from the previous layer)
   ============================================================ */

#partsCatalogSummary {
    margin: 0.35rem 0 0.15rem;
    font-size: 0.82rem;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

.parts-catalog-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.9rem 0 1rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
}

.parts-catalog-tabs {
    display: inline-flex;
    gap: 0.15rem;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    background: var(--bg-strong);
}

.parts-catalog-tabs__item {
    padding: 0.38rem 0.85rem;
    border-radius: 6px;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.parts-catalog-tabs__item:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
}

.parts-catalog-tabs__item[aria-current="page"] {
    color: var(--ink);
    background: var(--panel);
    box-shadow: var(--shadow-xs);
}

.parts-catalog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
}

.parts-catalog-actions .button {
    min-height: 34px;
    padding: 0 0.75rem;
    font-size: 0.84rem;
}

.parts-catalog-hint {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.83rem;
}

.parts-catalog-notification-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
    align-items: end;
    gap: 0.9rem 1.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
}

.parts-catalog-notification-settings__copy h3 {
    margin: 0.1rem 0 0.3rem;
    font-size: 1rem;
}

.parts-catalog-notification-settings__copy .section-support {
    margin: 0;
    max-width: 62ch;
}

.parts-catalog-notification-settings__form {
    display: grid;
    gap: 0.5rem;
    margin: 0;
}

.admin-page .parts-catalog-notification-settings__form label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.parts-catalog-notification-settings__form textarea {
    min-height: 2.7rem;
    grid-column: 1;
    width: 100%;
    min-width: 0;
}

.parts-catalog-notification-settings__form .modal__actions {
    margin: 0;
}

.parts-catalog-pane {
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
}

.parts-catalog-pane .admin-table-surface {
    border-radius: var(--radius-md);
    background: var(--panel);
}

/* ============================================================
   11. Responsive
   ============================================================ */

@media (max-width: 960px) {
    .parts-catalog-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .parts-catalog-notification-settings {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    body {
        font-size: 0.92rem;
    }

    .card,
    .signal-card,
    .stat-card,
    .employee-card,
    .insight,
    .integration-item,
    .admin-card {
        padding: 1rem;
    }

    .topbar,
    .topbar--home-app,
    .topbar--admin-app {
        padding: 0.55rem 0.7rem;
    }

    .topbar__brand-logo {
        height: 32px;
    }

    .workspace-shell__workbench {
        padding: 0 0.85rem;
    }

    .button {
        min-height: 42px;
    }

    .section-heading {
        flex-wrap: wrap;
    }

    .section-heading h2 {
        font-size: 1.08rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================
   12. Print
   ============================================================ */

@media print {
    body {
        background: #ffffff;
    }

    .topbar,
    .home-shell__rail,
    .admin-shell__rail {
        display: none !important;
    }
}
