:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #18212b;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f4f6f8; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(38, 99, 235, 0.24); outline-offset: 2px; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.app-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #dce2e8; background: rgba(255,255,255,.97); backdrop-filter: blur(14px); }
.header-content { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #17202a; color: #fff; font-weight: 750; }
.brand strong, .brand small, .user-copy strong, .user-copy small { display: block; }
.brand strong { letter-spacing: .06em; font-size: .88rem; }
.brand small, .user-copy small, .muted { color: #657181; }
.user-area { display: flex; align-items: center; gap: 18px; }
.user-copy { text-align: right; font-size: .9rem; }
.main-content { padding: 48px 0 80px; }
.page-heading { margin-bottom: 32px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.045em; }
h2 { margin-bottom: 6px; font-size: 1.55rem; }
h3 { margin-bottom: 6px; font-size: 1.15rem; }
.lead { max-width: 720px; color: #526170; font-size: 1.08rem; }
.eyebrow, .card-slug { margin-bottom: 8px; color: #536171; font-size: .76rem; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.section-heading { margin: 34px 0 16px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; color: #657181; font-size: .9rem; }
.breadcrumbs a { text-decoration: none; }
.customer-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border: 1px solid #dce2e8; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(24,33,43,.05); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.tenant-grid, .project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tenant-card, .project-card, .empty-state, .alert, .message-page { border: 1px solid #dce2e8; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px rgba(24,33,43,.05); }
.tenant-card { display: block; padding: 24px; text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.tenant-card:hover { transform: translateY(-2px); border-color: #aeb9c5; box-shadow: 0 14px 36px rgba(24,33,43,.08); }
.project-card { padding: 24px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.facts { display: grid; gap: 12px; margin: 22px 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 18px; padding-top: 12px; border-top: 1px solid #edf0f3; }
.facts dt { color: #657181; }
.facts dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere; }
.card-link { display: inline-block; margin-top: 22px; font-weight: 700; }
.project-actions { margin-top: 22px; }
.empty-state, .message-page { padding: 34px; }
.message-page { max-width: 720px; margin: 50px auto 0; }
.alert { display: grid; gap: 5px; padding: 18px 20px; margin-bottom: 20px; }
.alert-error { border-color: #f2c5c5; background: #fff7f7; color: #8d1d1d; }
.status-badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-size: .76rem; font-weight: 720; white-space: nowrap; }
.status-active { background: #e7f7ed; color: #126837; }
.status-progress { background: #fff4d8; color: #75520a; }
.status-failed { background: #fdeaea; color: #8d1d1d; }
.status-muted { background: #edf1f5; color: #526170; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button-primary { background: #17202a; color: #fff; }
.button-secondary { border-color: #cbd4dd; background: #fff; color: #18212b; }
.button-disabled { background: #edf1f5; color: #7b8794; cursor: not-allowed; }

.app-footer { border-top: 1px solid #dce2e8; background: #fff; color: #657181; }
.footer-content { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: .86rem; }
.footer-content nav { display: flex; gap: 18px; }
.footer-content a { text-decoration: none; }
.footer-content a:hover { text-decoration: underline; }
@media (max-width: 820px) {
    .tenant-grid, .project-grid { grid-template-columns: 1fr; }
    .customer-hero, .header-content { align-items: flex-start; }
    .customer-hero { flex-direction: column; }
    .header-content { padding: 14px 0; }
    .user-copy { display: none; }
    .footer-content { align-items: flex-start; flex-direction: column; justify-content: center; padding: 18px 0; }
}

.landing-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .7fr); gap: 24px; align-items: stretch; }
.landing-copy, .registration-panel, .auth-card { border: 1px solid #dce2e8; border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(24,33,43,.06); }
.landing-copy { padding: clamp(34px, 6vw, 72px); }
.landing-copy h1 { max-width: 820px; }
.registration-panel { padding: 34px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.registration-panel .button { width: 100%; }
.registration-note { margin: 18px 0 0; color: #657181; font-size: .9rem; line-height: 1.5; }
.landing-actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.auth-shell { max-width: 820px; margin: 0 auto; }
.auth-card { padding: clamp(28px, 5vw, 48px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.field { display: grid; gap: 7px; font-weight: 650; }
.field-wide { grid-column: 1 / -1; }
.field input { width: 100%; min-height: 46px; border: 1px solid #bfc9d4; border-radius: 9px; padding: 10px 12px; background: #fff; color: #18212b; }
.field input:focus { border-color: #526170; outline: 3px solid rgba(38,99,235,.12); }
.field-error, .validation-summary { color: #9a1d1d; font-size: .88rem; }
.alert-success { border-color: #b8dfc7; background: #f1fbf5; color: #126837; }
@media (max-width: 820px) {
    .landing-hero, .form-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
}
