:root {
    --green-950: #102419;
    --green-900: #173a26;
    --green-800: #1f5032;
    --green-700: #28683e;
    --green-600: #35824f;
    --green-100: #e9f4ed;
    --brown-700: #5f4638;
    --orange-500: #ed8b2c;
    --orange-100: #fff2df;
    --ink: #1d2720;
    --muted: #68736c;
    --surface: #ffffff;
    --surface-2: #f6f8f6;
    --surface-3: #edf1ee;
    --border: #dfe6e1;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --warning: #9a6700;
    --warning-bg: #fffaeb;
    --success: #167143;
    --success-bg: #ecfdf3;
    --shadow: 0 12px 30px rgba(20, 45, 29, .08);
    --radius: 18px;
    --sidebar: 278px;
}

:root[data-theme="dark"] {
    --ink: #edf5ef;
    --muted: #a9b6ad;
    --surface: #172019;
    --surface-2: #101611;
    --surface-3: #202a22;
    --border: #2d3a31;
    --green-100: #1f3527;
    --orange-100: #3b2a17;
    --danger-bg: #351b1a;
    --warning-bg: #332a12;
    --success-bg: #153624;
    --shadow: 0 15px 36px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--surface-2); }
body { margin: 0; min-height: 100vh; background: var(--surface-2); }
a { color: var(--green-700); text-decoration: none; }
button, input, select, textarea { font: inherit; }
code { padding: .2rem .45rem; border-radius: 7px; background: var(--surface-3); color: var(--green-700); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; background: linear-gradient(180deg, var(--green-950), #132b1d 70%, #0e2117); color: #fff; z-index: 50; overflow-y: auto; }
.brand { display: flex; gap: 13px; align-items: center; padding: 24px 22px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: .01em; }
.brand small { color: rgba(255,255,255,.64); margin-top: 2px; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; background: rgba(255,255,255,.08); font-weight: 900; letter-spacing: -.07em; }
.brand-mark span { color: var(--orange-500); margin: 0 1px; }
.brand-mark.large { width: 68px; height: 68px; font-size: 1.25rem; border-color: var(--border); background: var(--green-900); color: white; }
.brand-mark.hero { width: 86px; height: 86px; font-size: 1.6rem; border-color: rgba(255,255,255,.25); }
.navigation { padding: 16px 12px 32px; }
.nav-heading { margin: 20px 12px 8px; color: rgba(255,255,255,.42); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: rgba(255,255,255,.74); border-radius: 11px; font-size: .91rem; margin: 2px 0; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: rgba(237,139,44,.17); color: #fff; box-shadow: inset 3px 0 var(--orange-500); }
.nav-icon { width: 20px; text-align: center; color: rgba(255,255,255,.72); }
.sidebar-footer { margin-top: auto; padding: 20px 22px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.64); }
.sidebar-footer span, .sidebar-footer small { display: block; }
.sidebar-footer span { color: #fff; font-weight: 700; font-size: .84rem; }
.sidebar-footer small { margin-top: 4px; font-size: .72rem; }

.main-area { grid-column: 2; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { min-height: 92px; padding: 18px 30px; display: flex; align-items: center; gap: 18px; justify-content: space-between; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar h1 { margin: 2px 0 0; font-size: 1.45rem; }
.eyebrow { margin: 0; color: var(--green-600); font-weight: 800; text-transform: uppercase; letter-spacing: .11em; font-size: .68rem; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 7px 11px 7px 7px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.user-chip strong, .user-chip small { display: block; white-space: nowrap; }
.user-chip strong { font-size: .83rem; }
.user-chip small { color: var(--muted); font-size: .71rem; margin-top: 1px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); font-weight: 900; }
.icon-button { border: 1px solid var(--border); background: var(--surface); color: var(--ink); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; }
.mobile-menu { display: none; }
.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 30px; flex: 1; }
.app-footer { display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--border); padding: 20px 30px; font-size: .79rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-card { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: 34px; background: radial-gradient(circle at 90% 20%, rgba(237,139,44,.18), transparent 30%), linear-gradient(135deg, var(--surface), var(--green-100)); }
.hero-card h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 8px 0 10px; max-width: 750px; }
.hero-card p:not(.eyebrow) { color: var(--muted); max-width: 760px; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; }
.foundation-seal { width: 170px; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 50%; display: grid; place-content: center; text-align: center; background: color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: inset 0 0 0 10px color-mix(in srgb, var(--green-700) 9%, transparent); }
.foundation-seal strong { letter-spacing: .25em; margin-left: .25em; font-size: .72rem; color: var(--green-700); }
.foundation-seal span { font-size: 3rem; font-weight: 900; line-height: 1; margin: 5px 0; }
.foundation-seal small { color: var(--orange-500); font-weight: 900; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.metric-card { padding: 22px; }
.metric-label { color: var(--muted); font-size: .79rem; font-weight: 700; }
.metric-value { display: block; font-size: 2rem; margin: 8px 0 3px; }
.metric-card small { color: var(--muted); }
.success-text { color: var(--success); }

.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; margin-bottom: 22px; }
.panel { padding: 24px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.panel-header h3 { margin: 4px 0 0; }
.module-list { margin-top: 6px; }
.module-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--border); }
.module-row:last-child { border-bottom: 0; }
.module-row strong, .module-row small { display: block; }
.module-row small { margin-top: 3px; color: var(--muted); }
.status-badge { display: inline-flex; white-space: nowrap; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.status-badge.active { background: var(--success-bg); color: var(--success); }
.status-badge.planned { background: var(--orange-100); color: #a75a0c; }
.status-badge.disabled { background: var(--surface-3); color: var(--muted); }
.timeline { padding-top: 12px; }
.timeline-item { display: grid; grid-template-columns: 12px 1fr; gap: 12px; padding: 12px 0; }
.timeline-item > span { width: 9px; height: 9px; border-radius: 50%; background: var(--orange-500); margin-top: 5px; box-shadow: 0 0 0 5px var(--orange-100); }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item strong { font-size: .88rem; }
.timeline-item small { color: var(--muted); margin-top: 4px; }
.planned-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.planned-grid.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.planned-grid > div { display: flex; gap: 10px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.planned-grid span { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 8px; background: var(--green-100); color: var(--green-700); font-weight: 900; }

.page-heading { display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; margin-bottom: 22px; }
.page-heading h2 { font-size: 2rem; margin: 5px 0 8px; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.empty-state { padding: 60px 32px; text-align: center; }
.empty-state > p { max-width: 700px; margin: 8px auto; color: var(--muted); line-height: 1.7; }
.empty-icon { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 2rem; background: var(--green-100); color: var(--green-700); }
.empty-state .planned-grid { max-width: 800px; margin-left: auto; margin-right: auto; text-align: left; }

.system-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.system-check { padding: 20px; display: flex; gap: 12px; align-items: center; }
.system-check small, .system-check strong { display: block; }
.system-check small { color: var(--muted); margin-bottom: 3px; }
.check-dot { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; }
.check-dot.pass { background: var(--success); box-shadow: 0 0 0 5px var(--success-bg); }
.check-dot.fail { background: var(--danger); box-shadow: 0 0 0 5px var(--danger-bg); }
.detail-table > div { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.detail-table > div:last-child { border-bottom: 0; }
.detail-table span { color: var(--muted); }

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; background: var(--surface-2); }
td { font-size: .86rem; }
.empty-cell { text-align: center; color: var(--muted); padding: 35px; }

.button { display: inline-flex; white-space: nowrap; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; cursor: pointer; }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--green-700), var(--green-600)); box-shadow: 0 8px 18px rgba(40,104,62,.2); }
.button.secondary { color: var(--green-700); background: var(--green-100); border-color: color-mix(in srgb, var(--green-700) 15%, transparent); }
.button.ghost { color: var(--ink); background: var(--surface); border-color: var(--border); }
.button.small { min-height: 36px; padding: 0 12px; font-size: .78rem; }
.button.full { width: 100%; }

.alert { padding: 12px 14px; border-radius: 11px; margin: 12px 0; font-size: .88rem; }
.alert.danger { color: var(--danger); background: var(--danger-bg); border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent); }
.alert.warning { color: var(--warning); background: var(--warning-bg); border: 1px solid color-mix(in srgb, var(--warning) 20%, transparent); }
.alert.success { color: var(--success); background: var(--success-bg); border: 1px solid color-mix(in srgb, var(--success) 20%, transparent); }
.muted { color: var(--muted); }

.auth-page { background: radial-gradient(circle at 15% 10%, rgba(237,139,44,.15), transparent 30%), linear-gradient(135deg, #102419, #1b4b2e 65%, #5f4638); min-height: 100vh; padding: 30px; }
.auth-shell { max-width: 1160px; margin: 5vh auto; display: grid; grid-template-columns: 1.1fr .8fr; align-items: center; gap: 70px; }
.auth-brand-panel { color: white; padding: 30px; }
.auth-brand-panel .eyebrow { color: #f6b66e; margin-top: 24px; }
.auth-brand-panel h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: .98; margin: 12px 0 22px; max-width: 700px; }
.auth-brand-panel > p:not(.eyebrow) { color: rgba(255,255,255,.72); max-width: 650px; line-height: 1.75; }
.alpha-pill, .release-pill { display: inline-flex; margin-top: 24px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 800; font-size: .8rem; }
.auth-card { padding: 34px; max-width: 460px; width: 100%; margin-left: auto; }
.auth-card h2 { margin: 6px 0 8px; font-size: 2rem; }
.auth-card > p:not(.eyebrow):not(.form-note) { color: var(--muted); margin-bottom: 24px; }
label { display: block; font-weight: 750; font-size: .82rem; margin: 14px 0; }
label small { display: block; color: var(--muted); font-weight: 400; margin-top: 5px; }
input, select, textarea { width: 100%; margin-top: 7px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-600) 14%, transparent); }
.form-note { text-align: center; color: var(--muted); font-size: .77rem; margin: 16px 0 0; }

.install-shell { max-width: 1220px; margin: 0 auto; }
.install-brand { display: flex; align-items: center; gap: 18px; color: white; margin: 10px 0 28px; }
.install-brand h1 { margin: 2px 0; }
.install-brand .eyebrow { color: #f6b66e; }
.install-brand p:last-child { color: rgba(255,255,255,.7); margin: 0; }
.install-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.requirements, .install-form { padding: 28px; }
.requirements h2, .install-form h2 { margin-top: 0; }
.requirement { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .82rem; }
.requirement span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; font-weight: 900; }
.requirement.pass span { color: var(--success); background: var(--success-bg); }
.requirement.fail span { color: var(--danger); background: var(--danger-bg); }
.form-section-title { margin: 24px 0 10px; color: var(--green-700); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-grid.two { display: grid; grid-template-columns: 1fr 140px; gap: 14px; }
.success-mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--success-bg); color: var(--success); font-size: 1.8rem; font-weight: 900; margin-bottom: 20px; }

.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
    .metric-grid, .system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .planned-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
    .main-area { grid-column: 1; }
    .mobile-menu { display: inline-grid; place-items: center; }
    .topbar { padding: 15px 18px; }
    .content { padding: 22px 18px; }
    .user-chip { display: none; }
    .auth-shell { grid-template-columns: 1fr; gap: 15px; margin-top: 0; }
    .auth-brand-panel { padding: 10px; }
    .auth-brand-panel h1 { font-size: 2.7rem; }
    .auth-card { margin: 0; max-width: none; }
    .install-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
    .topbar h1 { font-size: 1.05rem; }
    .topbar .eyebrow { display: none; }
    .topbar-actions { gap: 6px; }
    .button.small { display: none; }
    .hero-card { grid-template-columns: 1fr; padding: 24px; }
    .foundation-seal { display: none; }
    .metric-grid, .system-grid, .planned-grid, .planned-grid.wide { grid-template-columns: 1fr; }
    .page-heading { display: block; }
    .page-heading .status-badge { margin-top: 14px; }
    .detail-table > div { grid-template-columns: 1fr; gap: 4px; }
    .form-grid.two { grid-template-columns: 1fr; }
    .app-footer { display: block; line-height: 1.8; }
    .auth-page { padding: 16px; }
    .auth-card, .install-form, .requirements { padding: 22px; }
}


/* Alpha 1.0.0 Build 002 — Clients module */
.status-badge.in_progress { background: #e9efff; color: #3454a4; }
:root[data-theme="dark"] .status-badge.in_progress { background: #1b2948; color: #aebfff; }
.action-heading { align-items: center; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.client-metrics { margin-top: 0; }
.filter-bar { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, .7fr)) minmax(130px, .6fr) auto auto; gap: 10px; align-items: center; padding: 16px; margin-bottom: 18px; }
.filter-bar input, .filter-bar select { margin: 0; min-height: 42px; }
.search-field { position: relative; }
.search-field span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); z-index: 1; }
.search-field input { padding-left: 36px; }
.filter-reset { font-size: .78rem; font-weight: 800; text-align: center; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border-bottom: 1px solid var(--border); }
.table-toolbar strong, .table-toolbar small { display: block; }
.table-toolbar small { color: var(--muted); margin-top: 3px; }
.client-table td:first-child { min-width: 220px; }
.client-table td:nth-child(3) { min-width: 190px; }
.client-table td small { display: block; color: var(--muted); margin-top: 5px; }
.client-name { color: var(--ink); font-weight: 850; font-size: .92rem; }
.client-name:hover { color: var(--green-600); }
.type-chip { display: inline-flex; align-items: center; border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 6px 10px; font-size: .72rem; color: var(--muted); font-weight: 800; }
.archived-row { opacity: .7; }
.row-actions { text-align: right; }
.small-always { min-height: 34px; padding: 0 11px; font-size: .76rem; }
.compact-empty { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 8px; }
.compact-empty strong { font-size: 1rem; }
.compact-empty span { color: var(--muted); margin-bottom: 8px; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-top: 1px solid var(--border); font-size: .82rem; }
.pagination span { color: var(--muted); }
.client-form { display: grid; gap: 18px; padding-bottom: 82px; }
.form-card { padding: 24px; }
.form-card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.form-card-header h3 { margin: 4px 0 0; }
.form-step { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--danger); }
.field-grid { display: grid; gap: 0 18px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-two { grid-column: span 2; }
.inline-note { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--muted); font-size: .79rem; line-height: 1.6; }
.checkbox-field { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.checkbox-field input { width: 20px; min-height: 20px; margin: 0; flex: 0 0 20px; }
.checkbox-field span, .checkbox-field strong, .checkbox-field small { display: block; }
.checkbox-field small { margin-top: 3px; }
.error-list { margin: 8px 0 0; padding-left: 20px; }
.sticky-form-actions { position: fixed; bottom: 0; right: 0; left: var(--sidebar); z-index: 18; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 30px; border-radius: 0; box-shadow: 0 -10px 30px rgba(20,45,29,.08); }
.client-profile-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 26px; margin-bottom: 22px; background: radial-gradient(circle at 88% 15%, rgba(237,139,44,.15), transparent 28%), var(--surface); }
.client-monogram { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; background: var(--green-100); color: var(--green-700); font-size: 1.7rem; font-weight: 900; }
.client-profile-title h2 { margin: 5px 0 4px; font-size: 2rem; }
.client-profile-title > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 22px; }
.profile-main, .profile-side { display: grid; align-content: start; gap: 22px; }
.contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.contact-action { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); color: var(--ink); }
.contact-action > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--green-100); color: var(--green-700); }
.contact-action small, .contact-action strong { display: block; }
.contact-action small { color: var(--muted); margin-bottom: 3px; }
.preserve-lines { line-height: 1.7; }
.notes-content { padding-top: 18px; line-height: 1.75; }
.related-card { padding-bottom: 10px; }
.related-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--ink); }
.related-row:last-child { border-bottom: 0; }
.related-row strong, .related-row small { display: block; }
.related-row small { color: var(--muted); margin-top: 3px; }
.related-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--green-100); color: var(--green-700); }
.timeline.compact .timeline-item { padding: 9px 0; }
.record-meta .detail-table > div { grid-template-columns: 1fr; gap: 3px; }
.danger-button { color: var(--danger); background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.update-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 22px; }
.update-summary > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.update-action-card { align-self: start; }
.update-action-card > p:not(.eyebrow):not(.form-note) { color: var(--muted); line-height: 1.7; }

@media (max-width: 1180px) {
    .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .search-field { grid-column: span 3; }
    .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
    .sticky-form-actions { left: 0; padding: 12px 18px; }
    .update-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .heading-actions { width: 100%; margin-top: 16px; }
    .heading-actions .button { flex: 1; }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .search-field { grid-column: span 2; }
    .field-grid.two, .field-grid.three { grid-template-columns: 1fr; }
    .span-two { grid-column: span 1; }
    .client-profile-hero { grid-template-columns: auto 1fr; }
    .profile-actions { grid-column: span 2; }
    .profile-actions .button { flex: 1; }
    .contact-actions { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .filter-bar { grid-template-columns: 1fr; }
    .search-field { grid-column: span 1; }
    .filter-bar .button { width: 100%; }
    .client-profile-hero { grid-template-columns: 1fr; text-align: center; }
    .client-monogram { margin: auto; }
    .profile-badges { justify-content: center; }
    .profile-actions { grid-column: span 1; }
}

/* Alpha 1.0.0 Build 003 — Contacts module */
.contact-filter-bar { grid-template-columns: minmax(280px, 1.5fr) repeat(5, minmax(125px, .7fr)) auto auto; }
.contact-table td:first-child { min-width: 220px; }
.contact-table td:nth-child(2) { min-width: 250px; }
.contact-table td:nth-child(3) { min-width: 210px; }
.linked-client { display: block; width: fit-content; color: var(--ink); font-weight: 800; margin-bottom: 4px; }
.linked-client:hover { color: var(--green-600); }
.role-selector { margin-top: 18px; }
.field-label { color: var(--muted); font-size: .78rem; font-weight: 800; margin: 0 0 9px; }
.role-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.role-check { display: flex; align-items: center; gap: 9px; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); cursor: pointer; }
.role-check input { width: 18px; min-height: 18px; margin: 0; }
.role-check span { font-size: .8rem; font-weight: 800; }
.relationship-flags { margin-top: 18px; }
.role-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.role-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-size: .67rem; font-weight: 850; }
.relationship-identity { display: flex; align-items: center; gap: 15px; }
.relationship-identity h3 { margin: 3px 0; }
.small-monogram { width: 54px; height: 54px; border-radius: 15px; font-size: 1.25rem; }
.relationship-list { display: grid; gap: 13px; padding-top: 17px; }
.relationship-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--surface-2); }
.relationship-card-main { display: flex; gap: 12px; align-items: flex-start; }
.relationship-card-main small { display: block; color: var(--muted); margin-top: 4px; }
.relationship-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px; background: var(--green-100); color: var(--green-700); font-weight: 900; }
.relationship-flags-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.relationship-flags-inline span { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .7rem; font-weight: 800; }
.relationship-note { margin: 13px 0 0; color: var(--muted); line-height: 1.65; font-size: .82rem; }
.relationship-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.relationship-actions form { margin: 0; }
.relationship-empty { padding: 30px 10px; }
.contact-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.client-contact-list { display: grid; gap: 10px; padding-top: 16px; }
.client-contact-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.contact-mini-monogram { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--green-100); color: var(--green-700); font-weight: 900; }
.client-contact-body small { display: block; color: var(--muted); margin-top: 4px; }
.client-contact-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 230px; }
.client-contact-meta span { color: var(--muted); font-size: .68rem; font-weight: 800; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 7px; }
.client-contact-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

@media (max-width: 1280px) {
    .contact-filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .contact-filter-bar .search-field { grid-column: span 4; }
    .client-contact-row { grid-template-columns: auto 1fr auto; }
    .client-contact-actions { grid-column: 2 / -1; }
}
@media (max-width: 900px) {
    .role-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .client-contact-row { grid-template-columns: auto 1fr; }
    .client-contact-meta, .client-contact-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 720px) {
    .contact-filter-bar { grid-template-columns: 1fr 1fr; }
    .contact-filter-bar .search-field { grid-column: span 2; }
    .role-check-grid { grid-template-columns: 1fr; }
    .contact-action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .contact-filter-bar { grid-template-columns: 1fr; }
    .contact-filter-bar .search-field { grid-column: span 1; }
    .client-contact-row { grid-template-columns: 1fr; text-align: center; }
    .contact-mini-monogram { margin: auto; }
    .client-contact-meta, .client-contact-actions { grid-column: 1; justify-content: center; }
    .relationship-actions { flex-direction: column; }
    .relationship-actions .button { width: 100%; }
}

/* Alpha 1.0.0 Build 004 — Properties module */
.property-filter-bar { grid-template-columns: minmax(300px, 1.5fr) repeat(6, minmax(125px, .7fr)) auto auto; }
.property-table td:first-child { min-width: 210px; }
.property-table td:nth-child(2) { min-width: 230px; }
.property-table td:nth-child(3) { min-width: 220px; }
.property-table td:nth-child(4) { min-width: 125px; }
.linked-client-names { display: block; color: var(--ink); font-weight: 800; line-height: 1.45; }
.property-profile-hero { background: radial-gradient(circle at 88% 15%, rgba(40,104,62,.17), transparent 28%), var(--surface); }
.property-monogram { font-size: 2rem; }
.property-contact-list { display: grid; gap: 12px; padding-top: 16px; }
.property-contact-row { grid-template-columns: auto minmax(220px, 1fr) auto auto; }
.property-contact-row form { margin: 0; }
.compact-note { margin-top: 9px; }
.property-flag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.client-property-list { display: grid; gap: 10px; padding-top: 16px; }
.client-property-row { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); color: var(--ink); }
.client-property-row:hover { border-color: color-mix(in srgb, var(--green-600) 32%, var(--border)); transform: translateY(-1px); }
.client-property-row strong, .client-property-row small { display: block; }
.client-property-row small { color: var(--muted); margin-top: 4px; }
.danger-zone > p { line-height: 1.65; }

@media (max-width: 1380px) {
    .property-filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .property-filter-bar .search-field { grid-column: span 4; }
}
@media (max-width: 1050px) {
    .property-contact-row { grid-template-columns: auto 1fr auto; }
    .property-contact-row .client-contact-actions { grid-column: 2 / -1; }
    .client-property-row { grid-template-columns: auto 1fr auto; }
    .client-property-row > span:last-child { display: none; }
}
@media (max-width: 760px) {
    .property-filter-bar { grid-template-columns: 1fr 1fr; }
    .property-filter-bar .search-field { grid-column: span 2; }
    .property-contact-row { grid-template-columns: auto 1fr; }
    .property-contact-row .client-contact-meta,
    .property-contact-row .client-contact-actions { grid-column: 2; justify-content: flex-start; }
    .client-property-row { grid-template-columns: auto 1fr; }
    .client-property-row .client-contact-meta { grid-column: 2; justify-content: flex-start; }
    .property-flag-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .property-filter-bar { grid-template-columns: 1fr; }
    .property-filter-bar .search-field { grid-column: span 1; }
    .property-contact-row, .client-property-row { grid-template-columns: 1fr; text-align: center; }
    .property-contact-row .contact-mini-monogram, .client-property-row .related-icon { margin: auto; }
    .property-contact-row .client-contact-meta,
    .property-contact-row .client-contact-actions,
    .client-property-row .client-contact-meta { grid-column: 1; justify-content: center; }
}

/* Build 005 — Services & Pricing */
.service-filter-bar { grid-template-columns: minmax(280px, 1.5fr) repeat(6, minmax(125px, .72fr)) auto auto; }
.service-table td:first-child { min-width: 250px; }
.service-table td:nth-child(2) { min-width: 150px; }
.service-table td:nth-child(3) { min-width: 220px; }
.service-table td:nth-child(4) { min-width: 170px; }
.service-table td small { display: block; color: var(--muted); margin-top: 5px; }
.service-monogram { background: linear-gradient(145deg, var(--green-100), var(--orange-100)); color: var(--green-700); }
.service-profile-hero { background: radial-gradient(circle at 88% 15%, rgba(237,139,44,.16), transparent 28%), linear-gradient(135deg, var(--surface), var(--green-100)); }
.service-pricing-panel { overflow: hidden; }
.pricing-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-top: 18px; }
.pricing-summary-grid article { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.pricing-summary-grid span, .pricing-summary-grid strong, .pricing-summary-grid small { display: block; }
.pricing-summary-grid span { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.pricing-summary-grid strong { font-size: 1.25rem; margin: 8px 0 5px; }
.pricing-summary-grid small { color: var(--muted); line-height: 1.45; }
.service-assignment-list { display: grid; gap: 13px; padding-top: 18px; }
.service-assignment-row { display: grid; grid-template-columns: 46px minmax(240px, 1fr) minmax(150px, .45fr) minmax(130px, .4fr) auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); }
.property-service-list .service-assignment-row { grid-template-columns: 46px minmax(260px, 1fr) minmax(150px, .45fr) auto; }
.service-assignment-row.ended { opacity: .68; }
.service-assignment-main > small, .service-assignment-price small { display: block; color: var(--muted); margin-top: 4px; }
.service-assignment-price { text-align: right; }
.service-assignment-price strong { display: block; font-size: 1rem; }
.service-assignment-row .client-contact-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.service-assignment-row .client-contact-actions form { margin: 0; }
.price-history-list { padding-top: 8px; }
.price-history-row { display: grid; grid-template-columns: minmax(220px, .7fr) 1fr; gap: 24px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.price-history-row:last-child { border-bottom: 0; }
.price-history-row strong, .price-history-row small { display: block; }
.price-history-row small { color: var(--muted); margin-top: 4px; }
.category-layout { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr); gap: 22px; align-items: start; }
.category-form-card { position: sticky; top: 116px; }
.category-list { padding-top: 6px; }
.category-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.category-row:last-child { border-bottom: 0; }
.category-row > div:first-child strong, .category-row > div:first-child small { display: block; }
.category-row > div:first-child small { color: var(--muted); margin-top: 4px; line-height: 1.45; }
.category-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: .78rem; }
.category-actions { display: flex; gap: 7px; justify-content: flex-end; }
.category-actions form { margin: 0; }
.form-inline-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.assignment-selection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.assignment-selection-grid article { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.assignment-selection-grid span, .assignment-selection-grid strong, .assignment-selection-grid small { display: block; }
.assignment-selection-grid span { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.assignment-selection-grid strong { margin: 7px 0 4px; }
.assignment-selection-grid small { color: var(--muted); line-height: 1.45; }

@media (max-width: 1280px) {
    .service-filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .service-filter-bar .search-field { grid-column: span 4; }
    .pricing-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .service-assignment-row { grid-template-columns: 46px minmax(220px, 1fr) minmax(150px, .5fr); }
    .service-assignment-row .client-contact-meta, .service-assignment-row .client-contact-actions { grid-column: 2 / -1; justify-content: flex-start; text-align: left; }
    .property-service-list .service-assignment-row { grid-template-columns: 46px minmax(220px, 1fr); }
}
@media (max-width: 900px) {
    .service-filter-bar { grid-template-columns: 1fr 1fr; }
    .service-filter-bar .search-field { grid-column: span 2; }
    .category-layout { grid-template-columns: 1fr; }
    .category-form-card { position: static; }
    .category-row { grid-template-columns: 1fr; }
    .category-meta, .category-actions { justify-content: flex-start; }
    .assignment-selection-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .service-filter-bar { grid-template-columns: 1fr; }
    .service-filter-bar .search-field { grid-column: span 1; }
    .pricing-summary-grid { grid-template-columns: 1fr; }
    .service-assignment-row, .property-service-list .service-assignment-row { grid-template-columns: 1fr; text-align: left; }
    .service-assignment-row .relationship-icon { margin: 0; }
    .service-assignment-row .client-contact-meta, .service-assignment-row .client-contact-actions { grid-column: 1; }
    .service-assignment-price { text-align: left; }
    .price-history-row { grid-template-columns: 1fr; gap: 7px; }
    .category-actions { flex-direction: column; }
    .category-actions .button { width: 100%; }
}

/* Alpha 1.0.0 Build 006 — Module Manager */
.status-badge.available { background: #eaf2ff; color: #2458a6; }
.status-badge.uninstalled { background: var(--surface-3); color: var(--muted); }
.status-badge.error { background: var(--danger-bg); color: var(--danger); }
.button[disabled] { opacity: .48; cursor: not-allowed; box-shadow: none; }
.module-metric-grid { margin-top: 0; }
.module-manager-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .7fr); gap: 22px; align-items: start; }
.module-manager-side { display: grid; gap: 22px; position: sticky; top: 116px; }
.module-card-list { display: grid; gap: 13px; padding-top: 18px; }
.module-manager-card { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); transition: border-color .18s ease, transform .18s ease; }
.module-manager-card:hover, .module-manager-card.selected { border-color: color-mix(in srgb, var(--green-600) 38%, var(--border)); transform: translateY(-1px); }
.module-manager-card.selected { box-shadow: inset 3px 0 var(--orange-500); }
.module-manager-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--green-100); color: var(--green-700); font-size: 1.2rem; font-weight: 900; }
.module-manager-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.module-manager-title strong, .module-manager-title small { display: block; }
.module-manager-title strong { font-size: 1rem; }
.module-manager-title small { color: var(--muted); margin-top: 4px; }
.module-manager-main > p { color: var(--muted); line-height: 1.55; margin: 11px 0; }
.module-manager-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .76rem; }
.module-manager-meta b { color: var(--ink); }
.module-inline-warning, .module-inline-note { margin-top: 10px; padding: 9px 11px; border-radius: 10px; font-size: .77rem; }
.module-inline-warning { color: var(--warning); background: var(--warning-bg); }
.module-inline-note { color: var(--green-700); background: var(--green-100); }
.module-manager-actions { min-width: 150px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.module-manager-actions form { margin: 0; }
.module-manager-actions .button { width: 100%; }
.core-lock, .module-waiting { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 11px; border-radius: 10px; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.core-lock { background: var(--green-100); color: var(--green-700); }
.module-waiting { background: var(--surface-3); color: var(--muted); }
.module-action-menu { position: relative; }
.module-action-menu > summary { list-style: none; cursor: pointer; min-height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--danger); font-size: .78rem; font-weight: 800; }
.module-action-menu > summary::-webkit-details-marker { display: none; }
.module-action-popover { position: absolute; right: 0; top: calc(100% + 8px); z-index: 15; width: 310px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.module-action-popover form + form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.module-action-popover strong, .module-action-popover small { display: block; }
.module-action-popover small { color: var(--muted); line-height: 1.45; margin: 4px 0 10px; }
.module-action-popover label { margin: 0 0 10px; }
.module-action-popover input { margin-top: 7px; }
.package-upload-card > p:not(.eyebrow), .module-safety-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.package-upload-card input[type="file"] { padding: 10px; background: var(--surface-2); }
.module-detail-list { margin: 12px 0 0; }
.module-detail-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.module-detail-list > div:last-child { border-bottom: 0; }
.module-detail-list dt { color: var(--muted); font-size: .78rem; font-weight: 800; }
.module-detail-list dd { margin: 0; overflow-wrap: anywhere; font-size: .82rem; }
.safety-step { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.safety-step:last-child { border-bottom: 0; }
.safety-step > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--green-100); color: var(--green-700); font-weight: 900; }
.safety-step.danger > span { background: var(--danger-bg); color: var(--danger); }
.safety-step strong, .safety-step small { display: block; }
.safety-step small { color: var(--muted); margin-top: 3px; line-height: 1.4; }
.module-history-panel { margin-top: 22px; }
.module-history-list { padding-top: 8px; }
.module-history-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.module-history-row:last-child { border-bottom: 0; }
.history-outcome { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-weight: 900; }
.history-outcome.success { background: var(--success-bg); color: var(--success); }
.history-outcome.failed { background: var(--danger-bg); color: var(--danger); }
.history-outcome.warning { background: var(--warning-bg); color: var(--warning); }
.module-history-row strong, .module-history-row small, .module-history-row time { display: block; }
.module-history-row small { color: var(--muted); margin-top: 4px; line-height: 1.4; }
.module-history-row time { color: var(--muted); font-size: .75rem; text-align: right; white-space: nowrap; }

@media (max-width: 1180px) {
    .module-manager-layout { grid-template-columns: 1fr; }
    .module-manager-side { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .module-manager-side { grid-template-columns: 1fr; }
    .module-manager-card { grid-template-columns: 46px minmax(0, 1fr); }
    .module-manager-actions { grid-column: 2; min-width: 0; flex-direction: row; flex-wrap: wrap; }
    .module-manager-actions > * { flex: 1 1 130px; }
    .module-action-popover { left: 0; right: auto; }
}
@media (max-width: 650px) {
    .module-manager-card { grid-template-columns: 1fr; }
    .module-manager-icon { margin: auto; }
    .module-manager-title { flex-direction: column; align-items: center; text-align: center; }
    .module-manager-main > p { text-align: center; }
    .module-manager-meta { justify-content: center; }
    .module-manager-actions { grid-column: 1; flex-direction: column; }
    .module-action-popover { position: static; width: 100%; margin-top: 8px; }
    .module-history-row { grid-template-columns: 38px 1fr; }
    .module-history-row time { grid-column: 2; text-align: left; }
}
.ftp-package-scan { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.ftp-package-scan strong, .ftp-package-scan small { display: block; }
.ftp-package-scan small { color: var(--muted); line-height: 1.5; margin: 5px 0 11px; }
.ftp-package-scan form { margin: 0; }

/* Build 007 — Operating Profiles & Business Identity */
.alert.warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, var(--border)); }
.alert.info { background: var(--green-100); color: var(--green-700); border-color: color-mix(in srgb, var(--green-600) 20%, var(--border)); }
.profile-setup-banner { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.profile-setup-banner strong, .profile-setup-banner span { display: block; }
.profile-setup-banner span { margin-top: 3px; font-size: .82rem; }
.topbar-title { min-width: 0; }
.profile-switcher { display: grid; grid-template-columns: auto minmax(230px, 320px) auto; align-items: center; gap: 8px; margin: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); min-width: 0; }
.profile-switcher label { margin: 0; color: var(--muted); font-size: .65rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.profile-switcher select { width: 100%; min-width: 0; max-width: 320px; min-height: 34px; padding: 6px 30px 6px 9px; border: 0; background-color: transparent; font-size: .78rem; font-weight: 800; text-overflow: ellipsis; }
.profile-mode-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-size: .66rem; font-weight: 900; white-space: nowrap; }
.profile-stage-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; margin-bottom: 22px; }
.stage-card { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 13px; align-items: start; padding: 18px; border: 1px solid var(--border); }
.stage-card.current { border-color: color-mix(in srgb, var(--green-600) 45%, var(--border)); box-shadow: inset 0 3px var(--green-600); }
.stage-card .status-badge { grid-column: 2; justify-self: start; }
.stage-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--green-100); color: var(--green-700); font-weight: 950; font-size: 1.05rem; }
.stage-card h3 { margin: 0 0 5px; }
.stage-card p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.5; font-size: .82rem; }
.stage-arrow { display: grid; place-items: center; color: var(--muted); font-size: 1.5rem; font-weight: 900; }
.profile-control-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .75fr); gap: 22px; margin-bottom: 22px; align-items: start; }
.operating-profile-list { display: grid; gap: 12px; }
.operating-profile-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); }
.operating-profile-card.selected { border-color: color-mix(in srgb, var(--green-600) 45%, var(--border)); box-shadow: inset 3px 0 var(--orange-500); }
.profile-card-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--green-100); color: var(--green-700); font-weight: 950; font-size: 1.1rem; }
.profile-card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-card-title h4 { margin: 0; }
.profile-card-main > p { margin: 5px 0; color: var(--muted); font-size: .8rem; }
.profile-card-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .72rem; }
.profile-card-actions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 124px; }
.profile-card-actions form { margin: 0; }
.profile-card-actions .button { width: 100%; }
.current-profile-label { display: grid; place-items: center; min-height: 34px; padding: 0 8px; border-radius: 9px; background: var(--success-bg); color: var(--success); font-size: .7rem; font-weight: 900; }
.invoice-identity-preview { position: sticky; top: 18px; }
.invoice-preview-paper { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 28px rgb(0 0 0 / .05); }
.invoice-preview-top { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 2px solid var(--green-600); }
.invoice-preview-top strong, .invoice-preview-top span { display: block; }
.invoice-preview-top strong { font-size: 1rem; }
.invoice-preview-top span { margin-top: 4px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.invoice-preview-top b { color: var(--green-700); letter-spacing: .08em; }
.invoice-preview-lines { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0; color: var(--muted); font-size: .74rem; }
.invoice-preview-total { display: flex; justify-content: space-between; align-items: end; padding: 14px; border-radius: 11px; background: var(--surface-2); }
.invoice-preview-total span { color: var(--muted); font-size: .76rem; }
.invoice-preview-total strong { font-size: 1.45rem; }
.invoice-preview-footer { margin-top: 14px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.readiness-panel { margin-bottom: 22px; }
.readiness-score { display: flex; align-items: baseline; gap: 9px; }
.readiness-score strong { font-size: 1.35rem; }
.readiness-score span { color: var(--muted); font-size: .75rem; }
.readiness-progress { overflow: hidden; height: 9px; border-radius: 999px; background: var(--surface-3); }
.readiness-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-600), var(--orange-500)); }
.readiness-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.readiness-actions p { flex: 1; margin: 0; color: var(--muted); line-height: 1.5; }
.profile-settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.profile-settings-main, .profile-settings-side { display: grid; gap: 22px; }
.profile-settings-side { position: sticky; top: 18px; }
.sequence-table-wrap { overflow-x: auto; }
.sequence-table input, .sequence-table select { min-width: 100px; }
.sequence-table input[type="number"] { min-width: 70px; width: 80px; }
.sequence-table code { white-space: nowrap; }
.sticky-save-bar { position: sticky; bottom: 12px; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 15px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.sticky-save-bar strong, .sticky-save-bar span { display: block; }
.sticky-save-bar span { color: var(--muted); font-size: .75rem; margin-top: 3px; }
.checklist-form { display: grid; gap: 9px; margin-top: 14px; }
.readiness-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); cursor: pointer; }
.readiness-item input { margin-top: 3px; }
.readiness-item strong, .readiness-item small { display: block; }
.readiness-item small { margin-top: 3px; color: var(--muted); line-height: 1.4; font-weight: 500; }
.activation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.activation-card { min-height: 100%; }
.activation-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--green-100); color: var(--green-700); font-size: 1.1rem; font-weight: 950; }
.activation-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.danger-confirm-form { display: grid; gap: 10px; margin-top: 17px; }
.danger-zone-card { border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.profile-module-table select { min-width: 155px; }

@media (max-width: 1280px) {
    .profile-switcher { grid-template-columns: minmax(210px, 290px) auto; }
    .profile-switcher label { display: none; }
}
@media (max-width: 1120px) {
    .profile-stage-flow { grid-template-columns: 1fr; }
    .stage-arrow { transform: rotate(90deg); min-height: 18px; }
    .profile-control-grid, .profile-settings-layout { grid-template-columns: 1fr; }
    .profile-settings-side, .invoice-identity-preview { position: static; }
    .activation-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .profile-switcher { order: 5; width: 100%; grid-template-columns: minmax(0, 1fr) auto; }
    .topbar-actions { flex-wrap: wrap; }
    .operating-profile-card { grid-template-columns: 44px 1fr; }
    .profile-card-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; }
    .profile-card-actions > * { flex: 1 1 110px; }
    .readiness-actions { align-items: stretch; flex-direction: column; }
    .readiness-actions .button { width: 100%; }
}
@media (max-width: 650px) {
    .profile-setup-banner { align-items: stretch; flex-direction: column; }
    .profile-switcher { grid-template-columns: 1fr; }
    .profile-mode-chip { justify-self: start; }
    .operating-profile-card { grid-template-columns: 1fr; text-align: center; }
    .profile-card-mark { margin: auto; }
    .profile-card-title { flex-direction: column; }
    .profile-card-meta { justify-content: center; }
    .profile-card-actions { grid-column: 1; flex-direction: column; }
    .sticky-save-bar { position: static; align-items: stretch; flex-direction: column; }
    .sticky-save-bar .button { width: 100%; }
}

.profile-card-badges { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }

/* Build 011.1 — Backup version and table layout */
.backup-table td:nth-child(1) { min-width: 150px; }
.backup-table td:nth-child(2) { min-width: 150px; }
.backup-table td:nth-child(3) { min-width: 210px; }
.backup-table td:nth-child(4) { min-width: 150px; }
.backup-table td:nth-child(7) { min-width: 260px; }
.backup-created strong, .backup-created small,
.backup-owner strong, .backup-owner small { display: block; }
.backup-created small, .backup-owner small,
.backup-table td small { color: var(--muted); margin-top: 4px; }
.backup-version { font-weight: 750; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.button-row form { margin: 0; }
.backup-actions .button { white-space: nowrap; }



/* Build 011.1 backup-table layout hotfix */
.backup-created { white-space: nowrap; }
.backup-created br { display: block; }
.backup-created small { display: inline-block; margin-top: 3px; }
.backup-actions { display: grid; gap: 7px; justify-items: start; min-width: 190px; }
.backup-actions .backup-download { display: inline-flex; }
.backup-secondary-actions { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; }
.backup-secondary-actions form { margin: 0; }
.backup-secondary-actions .button { white-space: nowrap; }
@media (max-width: 720px) {
    .backup-secondary-actions { flex-wrap: wrap; }
}


/* Build 013 dashboard integration */
.dashboard-jobs-panel { margin-bottom:22px; }
.dashboard-job-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:16px 0; }
.dashboard-job-summary a { display:flex; justify-content:space-between; align-items:center; padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); color:var(--ink); }
.dashboard-job-summary a span { color:var(--muted); font-size:.76rem; font-weight:800; }
.dashboard-job-summary a strong { font-size:1.35rem; }
.dashboard-job-summary a.attention { border-color:color-mix(in srgb,var(--danger) 30%,var(--border)); background:var(--danger-bg); }
.dashboard-upcoming-jobs { display:grid; }
.dashboard-upcoming-jobs > a { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:13px; align-items:center; padding:12px 0; border-top:1px solid var(--border); color:var(--ink); }
.dashboard-upcoming-jobs > a > div:nth-child(2) strong,.dashboard-upcoming-jobs > a > div:nth-child(2) small { display:block; }
.dashboard-upcoming-jobs > a > div:nth-child(2) small { margin-top:3px; color:var(--muted); }
.dashboard-job-date { width:44px; height:44px; display:grid; place-content:center; text-align:center; border-radius:12px; background:var(--green-100); color:var(--green-700); }
.dashboard-job-date strong { font-size:1.1rem; line-height:1; }
.dashboard-job-date span { margin-top:3px; font-size:.58rem; font-weight:900; text-transform:uppercase; }
@media(max-width:900px){.dashboard-job-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.dashboard-job-summary{grid-template-columns:1fr}.dashboard-upcoming-jobs>a{grid-template-columns:auto 1fr}.dashboard-upcoming-jobs .status-badge{grid-column:2;justify-self:start}}

/* Build 014.1 — Global text-containment and responsive overflow hotfix */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Grid and flex children must be allowed to shrink instead of forcing their cards wider. */
.main-area,
.content,
.card,
.panel,
.topbar-title,
.topbar-actions,
.page-heading > *,
.panel-header > *,
.hero-card > *,
.dashboard-grid > *,
.metric-grid > *,
.system-grid > *,
.profile-grid > *,
.profile-main,
.profile-side,
.profile-settings-layout > *,
.profile-settings-main,
.profile-settings-side,
.planned-grid > *,
.detail-table > div > *,
.heading-actions > *,
.module-row > *,
.timeline-item > *,
.related-row > *,
.contact-action > *,
.table-toolbar > *,
.sticky-save-bar > * {
    min-width: 0;
    max-width: 100%;
}

/* Long names, email addresses, invoice numbers, URLs, and notes stay inside cards. */
.card :where(h1, h2, h3, h4, h5, h6, p, strong, small, span, a, code, label, li),
.panel :where(h1, h2, h3, h4, h5, h6, p, strong, small, span, a, code, label, li),
.alert,
.inline-note,
.notes-content,
.preserve-lines,
.module-row,
.timeline-item,
.related-row,
.contact-action,
.table-toolbar,
td,
th {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Two-column detail rows now use a flexible label column and a shrinkable value column. */
.detail-table > div {
    grid-template-columns: minmax(105px, 220px) minmax(0, 1fr);
}
.detail-table strong,
.detail-table a,
.detail-table code {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Keep controls and actions inside their parent cards. */
input,
select,
textarea,
button,
.button,
.status-badge {
    max-width: 100%;
}
.button,
.status-badge {
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* Media never enlarges a card or page past its container. */
img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

/* Tables retain intentional horizontal scrolling inside their own wrapper. */
.table-wrap,
.sequence-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

@media (max-width: 760px) {
    .detail-table > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .panel-header,
    .page-heading,
    .table-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }
    .panel-header .status-badge,
    .page-heading .button,
    .heading-actions,
    .heading-actions .button {
        max-width: 100%;
    }
}

/* Build 014.2 — Remastered Client Workspace & Safe Permanent Delete */
.client-workspace-heading { margin-bottom: 18px; }
.client-overview-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.client-overview-grid .metric-card { min-height:132px; }
.client-safety-note { display:flex; align-items:center; gap:13px; padding:14px 16px; margin-bottom:16px; border-color:color-mix(in srgb,var(--green-600) 22%,var(--border)); background:linear-gradient(90deg,color-mix(in srgb,var(--green-100) 55%,var(--surface)),var(--surface)); }
.client-safety-note strong,.client-safety-note small { display:block; }
.client-safety-note small { margin-top:3px; color:var(--muted); line-height:1.5; }
.client-safety-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:50%; background:var(--green-600); color:#fff; font-weight:950; }
.client-filter-remaster { grid-template-columns:minmax(280px,1.5fr) repeat(4,minmax(130px,.7fr)) auto auto; }
.client-workspace-card { overflow:visible; }
.client-table-remastered th:nth-child(1) { min-width:245px; }
.client-table-remastered th:nth-child(2) { min-width:225px; }
.client-table-remastered th:nth-child(3) { min-width:135px; }
.client-table-remastered th:nth-child(4) { min-width:205px; }
.client-table-remastered th:nth-child(5) { min-width:145px; }
.client-table-remastered th:nth-child(6) { min-width:120px; }
.client-table-remastered td { vertical-align:middle; }
.client-table-remastered td:nth-child(5) small { display:block; margin-top:7px; color:var(--muted); }
.client-table-identity { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; }
.client-list-monogram { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; background:linear-gradient(145deg,var(--green-100),var(--orange-100)); color:var(--green-700); font-weight:950; font-size:1rem; }
.client-primary-contact,.client-contact-line { display:block; }
.client-primary-contact { color:var(--ink); font-size:.86rem; }
.client-contact-line { width:fit-content; max-width:100%; margin-top:3px; color:var(--green-700); font-size:.75rem; }
.client-contact-line:hover,.client-inline-link:hover { text-decoration:underline; }
.client-stat-number { display:block; color:var(--ink); font-size:1.25rem; line-height:1; }
.client-inline-link { display:block; width:fit-content; margin-top:7px; color:var(--green-700); font-size:.72rem; font-weight:850; }
.client-work-summary { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:7px; }
.client-work-summary span { display:inline-flex; gap:4px; align-items:center; padding:5px 8px; border:1px solid var(--border); border-radius:999px; background:var(--surface-2); color:var(--muted); font-size:.68rem; }
.client-work-summary strong { color:var(--ink); }
.attention-text { color:var(--danger) !important; font-weight:800; }
.client-action-menu { position:relative; display:inline-block; text-align:left; min-width:105px; }
.client-action-menu > summary { list-style:none; cursor:pointer; min-height:36px; display:grid; place-items:center; padding:0 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--ink); font-size:.76rem; font-weight:850; }
.client-action-menu > summary::-webkit-details-marker { display:none; }
.client-action-menu[open] > summary { border-color:var(--green-600); box-shadow:0 0 0 3px color-mix(in srgb,var(--green-600) 12%,transparent); }
.client-action-popover { display:grid; gap:3px; min-width:190px; margin-top:7px; padding:7px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
.client-action-popover a,.client-action-popover button { width:100%; min-height:34px; display:flex; align-items:center; padding:7px 9px; border:0; border-radius:8px; background:transparent; color:var(--ink); font:inherit; font-size:.75rem; font-weight:800; text-align:left; cursor:pointer; }
.client-action-popover a:hover,.client-action-popover button:hover { background:var(--surface-2); }
.client-action-popover form { margin:0; }
.client-action-divider { height:1px; margin:3px 0; background:var(--border); }
.client-action-popover .danger-link { color:var(--danger); }
.client-action-popover .disabled-link { opacity:.72; }
.record-management-actions { display:grid; gap:9px; margin-top:14px; }
.record-management-actions form { margin:0; }
.record-management-note { color:var(--muted); line-height:1.45; text-align:center; }

.client-delete-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(285px,.65fr); gap:22px; align-items:start; }
.client-delete-main,.client-delete-side { display:grid; gap:22px; align-content:start; }
.client-delete-identity { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:16px; align-items:center; }
.client-delete-identity h3 { margin:4px 0; font-size:1.45rem; }
.client-delete-identity p:not(.eyebrow) { margin:0; color:var(--muted); }
.client-impact-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; margin-top:17px; }
.client-impact-grid article { min-height:118px; padding:15px; border:1px solid var(--border); border-radius:13px; background:var(--surface-2); }
.client-impact-grid span,.client-impact-grid strong,.client-impact-grid small { display:block; }
.client-impact-grid span { color:var(--muted); font-size:.7rem; font-weight:850; text-transform:uppercase; letter-spacing:.06em; }
.client-impact-grid strong { margin:7px 0 5px; font-size:1.55rem; }
.client-impact-grid small { color:var(--muted); line-height:1.4; }
.client-impact-grid .impact-blocked { border-color:color-mix(in srgb,var(--danger) 35%,var(--border)); background:var(--danger-bg); }
.client-impact-grid .impact-blocked strong,.client-impact-grid .impact-blocked small { color:var(--danger); }
.client-delete-blocked { border-color:color-mix(in srgb,var(--orange-500) 30%,var(--border)); }
.client-delete-blocked > p,.client-delete-explanation { color:var(--muted); line-height:1.7; }
.delete-choice-list { display:grid; gap:12px; margin-top:15px; }
.delete-choice-list > div { display:grid; grid-template-columns:auto 1fr; gap:11px; align-items:start; padding:12px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); }
.delete-choice-list > div > span { width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:var(--green-100); color:var(--green-700); font-weight:950; }
.delete-choice-list p { margin:0; }
.delete-choice-list strong,.delete-choice-list small { display:block; }
.delete-choice-list small { margin-top:3px; color:var(--muted); line-height:1.45; }
.client-preserved-list { margin:15px 0 0; padding-left:20px; color:var(--muted); line-height:1.9; }

@media(max-width:1250px){
    .client-overview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .client-filter-remaster{grid-template-columns:repeat(3,minmax(0,1fr))}
    .client-filter-remaster .search-field{grid-column:span 3}
}
@media(max-width:980px){
    .client-delete-layout{grid-template-columns:1fr}
    .client-delete-side{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
    .client-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .client-filter-remaster{grid-template-columns:1fr 1fr}
    .client-filter-remaster .search-field{grid-column:span 2}
    .client-impact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .client-delete-identity{grid-template-columns:auto 1fr}
    .client-delete-identity>.status-badge{grid-column:2;justify-self:start}
    .client-delete-side{grid-template-columns:1fr}
}
@media(max-width:520px){
    .client-overview-grid,.client-impact-grid{grid-template-columns:1fr}
    .client-filter-remaster{grid-template-columns:1fr}
    .client-filter-remaster .search-field{grid-column:1}
    .client-safety-note{align-items:flex-start}
    .client-delete-identity{grid-template-columns:1fr;text-align:center}
    .client-delete-identity .client-monogram{margin:auto}
    .client-delete-identity>.status-badge{grid-column:1;justify-self:center}
}

/* Module Manager 2.1 */
.module-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}.module-tool-grid form{margin:0}.module-replace-box{margin-top:18px;padding:16px;border:1px solid color-mix(in srgb,var(--green-600) 24%,var(--border));border-radius:14px;background:var(--green-100)}.module-replace-box>strong,.module-replace-box>small{display:block}.module-replace-box>small{margin:5px 0 12px;color:var(--muted);line-height:1.5}.module-replace-box form{margin:0;display:grid;gap:10px}.module-replace-box input[type=file]{background:var(--surface);padding:9px}.module-backup-list{margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}.module-backup-list>strong{display:block;margin-bottom:9px}.module-backup-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border)}.module-backup-row:last-child{border-bottom:0}.module-backup-row b,.module-backup-row small{display:block}.module-backup-row small{color:var(--muted);margin-top:3px;font-size:.72rem}.module-backup-row form{margin:0}.module-manager-actions{min-width:160px}.module-manager-card{padding:20px;gap:18px}.module-manager-main>p{max-width:760px}.module-manager-title small{font-size:.76rem}.package-upload-card{overflow:hidden}
@media(max-width:650px){.module-tool-grid{grid-template-columns:1fr}.module-backup-row{align-items:flex-start;flex-direction:column}.module-backup-row form,.module-backup-row .button{width:100%}}


/* Core 1.0.1 — permanent public website shortcut */
.topbar-site-link { white-space: nowrap; }
@media (max-width: 760px) {
    .topbar-site-link { order: 4; }
}
@media (max-width: 520px) {
    .topbar-site-link { width: 42px; min-width: 42px; padding-inline: 0; overflow: hidden; font-size: 0; }
    .topbar-site-link::before { content: "↗"; font-size: 1rem; }
}

/* Core 1.1.2 — security center and protected sign-out */
.logout-form { margin: 0; }
.logout-form .button { white-space: nowrap; }
.text-danger { color: var(--danger) !important; }
.security-event-table code { white-space: nowrap; }


/* Core 1.1.4 — global topbar polish and operating-profile text visibility */
.topbar-title { flex: 1 1 220px; }
.topbar-title .eyebrow { white-space: normal; line-height: 1.25; }
.profile-switcher select { color: var(--ink); }
.profile-switcher select:focus { outline: 2px solid color-mix(in srgb, var(--green-600) 35%, transparent); outline-offset: 1px; border-radius: 8px; }
@media (max-width: 1450px) {
    .profile-switcher label { display: none; }
    .profile-switcher { grid-template-columns: minmax(210px, 290px) auto; }
}
@media (max-width: 1080px) {
    .topbar { align-items: flex-start; flex-wrap: wrap; }
    .topbar-title { flex: 1 1 220px; }
    .topbar-actions { flex: 1 1 100%; flex-wrap: wrap; }
}
@media (max-width: 900px) {
    .topbar-actions { justify-content: flex-start; }
    .profile-switcher { flex: 1 1 100%; width: 100%; grid-template-columns: minmax(0, 1fr) auto; }
    .profile-switcher select { max-width: none; }
}
@media (max-width: 650px) {
    .profile-switcher { grid-template-columns: minmax(0, 1fr) auto; }
    .profile-mode-chip { justify-self: end; }
}
@media (max-width: 430px) {
    .profile-switcher { grid-template-columns: minmax(0, 1fr); }
    .profile-mode-chip { justify-self: start; }
}


/* Core 2.0.2 — Production runtime */
.production-hero { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr); gap:22px; padding:26px; margin-bottom:22px; background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--green-100) 42%,var(--surface))); }
.production-hero h3 { margin:5px 0 8px; font-size:1.55rem; }
.production-score { display:flex; align-items:center; justify-content:flex-end; gap:16px; }
.production-score-ring { width:88px; height:88px; border-radius:50%; display:grid; place-items:center; background:var(--green-100); color:var(--green-700); font-size:1.35rem; font-weight:900; border:8px solid color-mix(in srgb,var(--green-600) 24%,transparent); }
.production-score-copy strong,.production-score-copy small { display:block; }
.production-score-copy small { color:var(--muted); margin-top:4px; }
.production-issues { margin:14px 0 0; padding:0; list-style:none; display:grid; gap:8px; }
.production-issues li { padding:10px 12px; border-radius:10px; background:var(--warning-bg); color:var(--warning); font-size:.82rem; font-weight:700; }
.runtime-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px; }
.runtime-meta span { display:inline-flex; align-items:center; min-height:30px; padding:0 10px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--muted); font-size:.74rem; font-weight:800; white-space:nowrap; }
@media (max-width:920px) { .production-hero { grid-template-columns:1fr; } .production-score { justify-content:flex-start; } }
