html {
    font-size: 16px;
}

body {
    margin: 0;
    color: #10231f;
    background: #edf5ef;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: #0b7a4b;
    text-decoration: none;
}

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

.sidebar {
    background: #0e3f35;
    color: #f3fff7;
    padding: 24px 16px;
}

.brand {
    align-items: center;
    color: #f3fff7;
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.brand:hover {
    color: #f3fff7;
}

.brand-mark {
    align-items: center;
    background: #b9ead0;
    border-radius: 8px;
    color: #0e3f35;
    display: inline-flex;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.brand-mark img {
    height: 30px;
    width: 30px;
}

.brand small {
    color: #b9d7cd;
    display: block;
    font-size: .78rem;
}

.side-nav {
    display: grid;
    gap: 18px;
}

.side-section h2 {
    color: #b9d7cd;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.side-nav a {
    border-radius: 8px;
    color: #e5fff0;
    display: block;
    margin-bottom: 2px;
    padding: 8px 10px;
}

.side-nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: #ffffff;
}

.main-frame {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #cfe3d7;
    display: flex;
    justify-content: space-between;
    min-height: 92px;
    padding: 20px 32px;
}

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

.eyebrow {
    color: #0b7a4b;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

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

.content {
    padding: 28px 32px;
}

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

.page-header h1 {
    font-size: 1.8rem;
    line-height: 1.15;
    margin: 0;
}

.page-subtitle {
    color: #55716b;
    margin: 6px 0 0;
}

.executive-header {
    border-bottom: 1px solid #cfe3d7;
    padding-bottom: 18px;
}

.app-footer {
    color: #55716b;
    font-size: .86rem;
    padding: 0 32px 24px;
}

.metric-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.metric-card,
.panel,
.setup-panel,
.login-card {
    background: #ffffff;
    border: 1px solid #cfe3d7;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(18, 70, 54, .08);
}

.metric-card {
    padding: 20px;
}

.executive-metrics {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.compact-metrics {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.compact-metrics .metric-card {
    padding: 16px;
}

.metric-card span {
    color: #55716b;
    display: block;
    font-size: .9rem;
}

.metric-card strong {
    display: block;
    font-size: 2rem;
    margin-top: 8px;
}

.metric-card small {
    color: #55716b;
    display: block;
    font-size: .82rem;
    line-height: 1.35;
    margin-top: 4px;
}

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

.dashboard-grid {
    margin-bottom: 20px;
}

.module-summary {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.module-summary .page-subtitle {
    max-width: 840px;
}

.module-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.module-filters {
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) repeat(3, minmax(150px, 1fr)) auto;
}

.activity-grid {
    align-items: start;
}

.panel,
.setup-panel {
    padding: 22px;
}

.panel-heading {
    align-items: start;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-heading h2,
.setup-panel h2 {
    font-size: 1.1rem;
    margin: 0;
}

.panel-note,
.empty-copy {
    color: #55716b;
    font-size: .86rem;
}

.dashboard-filters {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) repeat(3, minmax(150px, 1fr)) auto;
    margin-bottom: 20px;
    padding: 18px;
}

.dashboard-filters label {
    margin: 0;
}

.filter-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.trend-list,
.bar-list {
    display: grid;
    gap: 12px;
}

.trend-row,
.bar-row {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(110px, 1fr) minmax(120px, 2fr) minmax(86px, auto);
}

.bar-row {
    grid-template-columns: minmax(150px, 1.35fr) minmax(120px, 2fr) minmax(86px, auto);
}

.compact-bar {
    grid-template-columns: minmax(72px, .6fr) minmax(120px, 2fr) minmax(86px, auto);
}

.trend-row span,
.bar-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.trend-row strong,
.bar-row strong {
    font-size: .94rem;
    text-align: right;
    white-space: nowrap;
}

.trend-track,
.category-track {
    background: #e5f2eb;
    border-radius: 999px;
    height: 10px;
    min-width: 0;
    overflow: hidden;
}

.trend-bar,
.category-bar {
    background: #0b7a4b;
    border-radius: inherit;
    height: 100%;
    min-width: 3px;
}

.accent-blue {
    background: #176b87;
}

.accent-violet {
    background: #6d5bd0;
}

.accent-amber {
    background: #b7791f;
}

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

.status-summary {
    border: 1px solid #d9e8df;
    border-radius: 8px;
    padding: 12px;
}

.status-summary strong {
    display: block;
    font-size: 1.15rem;
    margin-top: 10px;
}

.status-summary small {
    color: #55716b;
    display: block;
    margin-top: 2px;
}

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

.data-table th,
.data-table td {
    border-bottom: 1px solid #d9e8df;
    padding: 10px 8px;
    text-align: left;
}

.data-table th {
    color: #55716b;
    font-size: .78rem;
    text-transform: uppercase;
}

.status {
    background: #e1f7e9;
    border: 1px solid #95d9ae;
    border-radius: 999px;
    color: #0d6a42;
    display: inline-block;
    font-size: .78rem;
    padding: 4px 10px;
}

.role-chip-list,
.company-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-chip,
.company-chip {
    border-radius: 999px;
    display: inline-block;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 6px 10px;
}

.role-platform {
    background: #e6f1ff;
    border: 1px solid #aac7ef;
    color: #174a7c;
}

.role-company {
    background: #e5f2eb;
    border: 1px solid #b8d9c8;
    color: #0b5c3c;
}

.company-chip {
    background: #f6fbf7;
    border: 1px solid #cfe3d7;
    color: #244d45;
}

.muted {
    color: #55716b;
    font-size: .88rem;
}

.user-rbac-table td:first-child strong,
.user-rbac-table td:first-child small {
    display: block;
}

.user-rbac-table td:first-child small {
    color: #55716b;
    margin-top: 3px;
}

.activity-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding: 12px;
}

.activity-tab {
    align-items: center;
    background: #f6fbf7;
    border: 1px solid #cfe3d7;
    border-radius: 8px;
    color: #0e3f35;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 12px;
    min-height: 42px;
    padding: 8px 12px;
}

.activity-tab:hover,
.activity-tab.active {
    background: #0b7a4b;
    border-color: #0b7a4b;
    color: #ffffff;
}

.activity-tab span {
    font-weight: 700;
    white-space: nowrap;
}

.activity-tab strong {
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
    font-size: .78rem;
    min-width: 24px;
    padding: 3px 8px;
    text-align: center;
}

.activity-workspace-grid {
    align-items: start;
    grid-template-columns: minmax(380px, .95fr) minmax(520px, 1.05fr);
}

.activity-entry-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(620px, 1.35fr) minmax(360px, .65fr);
}

.activity-entry-panel {
    min-width: 0;
}

.activity-context-rail {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.activity-picker {
    margin-bottom: 16px;
}

.active-activity-banner {
    align-items: center;
    background: #f6fbf7;
    border: 1px solid #d9e8df;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 14px;
}

.active-activity-banner strong {
    display: block;
    font-size: 1.05rem;
}

.active-activity-banner small {
    color: #55716b;
    display: block;
    margin-top: 4px;
}

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

.readonly-field {
    align-items: center;
    background: #f6fbf7;
    border: 1px solid #b9cfc5;
    border-radius: 8px;
    box-sizing: border-box;
    color: #0e3f35;
    display: flex;
    min-height: 45px;
    padding: 11px 12px;
    width: 100%;
}

.compact-table th,
.compact-table td {
    font-size: .88rem;
    vertical-align: top;
}

.selection-list-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.selection-list-card {
    border: 1px solid #d9e8df;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.selection-list-card h3 {
    font-size: 1.02rem;
    margin: 0 0 4px;
}

.selection-list-card small {
    color: #55716b;
}

.option-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-chip {
    background: #e5f2eb;
    border: 1px solid #cfe3d7;
    border-radius: 999px;
    color: #0e3f35;
    display: inline-block;
    font-size: .82rem;
    font-weight: 700;
    padding: 5px 10px;
}

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

.activity-row {
    align-items: center;
    border: 1px solid #d9e8df;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px;
}

.activity-row span {
    color: #55716b;
    display: block;
    font-size: .82rem;
    margin-top: 3px;
}

.activity-row small {
    color: #55716b;
    display: block;
    font-size: .82rem;
    line-height: 1.35;
    margin-top: 6px;
}

.activity-pill,
.activity-row .activity-pill {
    background: #e5f2eb;
    border: 1px solid #cfe3d7;
    border-radius: 999px;
    color: #0b7a4b;
    display: inline-block;
    font-size: .72rem;
    font-weight: 800;
    margin: 0 0 8px;
    padding: 3px 9px;
}

.method-row {
    align-items: flex-start;
}

.plain-list {
    margin: 0;
    padding-left: 20px;
}

.plain-list li {
    margin-bottom: 8px;
}

.alert-panel {
    border-color: #e6b7b7;
    margin-bottom: 18px;
}

.alert-panel .eyebrow,
.alert-panel h2 {
    color: #9f2424;
}

.success-panel {
    border-color: #95d9ae;
    margin-bottom: 18px;
}

.unit-label {
    color: #55716b;
    font-size: .82rem;
    font-weight: 600;
    margin-left: 4px;
}

.button {
    background: #0b7a4b;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    padding: 10px 14px;
}

.button:hover {
    background: #075d3b;
    color: #ffffff;
}

.button-secondary {
    background: #e5f2eb;
    color: #0e3f35;
}

.button-wide {
    margin-top: 18px;
    width: 100%;
}

.login-page {
    background: #052f35;
    box-sizing: border-box;
    display: flex;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(12px, 2vh, 28px);
}

.auth-shell {
    display: grid;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    place-items: center;
    width: 100%;
}

.auth-shell-sustainability {
    align-items: stretch;
    background:
        linear-gradient(90deg, rgba(5, 47, 53, .88) 0%, rgba(11, 86, 96, .66) 42%, rgba(244, 234, 218, .94) 72%, rgba(255, 255, 255, .98) 100%),
        url("../img/login-sustainability-hero.jpg") center / cover no-repeat;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(5, 47, 53, .26);
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 460px);
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding: clamp(20px, 3vw, 48px);
    width: 100%;
}

.auth-hero-copy {
    align-self: end;
    color: #f9f3e8;
    max-width: 560px;
    padding: 0 24px 12px 0;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .34);
}

.auth-hero-copy .eyebrow {
    color: #b9ead0;
}

.auth-hero-copy h1 {
    color: #ffffff;
    font-size: clamp(2.8rem, 5.8vw, 5.4rem);
    font-weight: 800;
    line-height: .94;
    margin: 14px 0 12px;
}

.auth-hero-copy p:last-child {
    color: #f4eada;
    font-size: 1.12rem;
    line-height: 1.5;
    margin: 0;
    max-width: 420px;
}

.auth-panel {
    max-width: 420px;
    width: 100%;
}

.auth-panel-glass {
    align-self: center;
    background: rgba(255, 255, 255, .93);
    border: 1px solid rgba(199, 223, 200, .8);
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(5, 47, 53, .24);
    justify-self: end;
    padding: clamp(22px, 2.6vw, 28px);
}

.auth-brand {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-brand-single {
    align-items: center;
    border-bottom: 1px solid rgba(11, 86, 96, .12);
    margin-bottom: 22px;
    padding-bottom: 20px;
}

.auth-brand-mark-frame {
    align-items: center;
    background: linear-gradient(135deg, rgba(199, 223, 200, .4), rgba(244, 234, 218, .28));
    border: 1px solid rgba(11, 86, 96, .12);
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 72px;
    justify-content: center;
    width: 72px;
}

.auth-brand-mark {
    display: block;
    height: 58px;
    object-fit: contain;
    width: 58px;
}

.auth-brand h1 {
    margin: 0 0 6px;
}

.auth-brand p:last-child {
    color: #64748b;
    margin: 0;
}

label {
    display: block;
    font-weight: 700;
    margin: 14px 0 6px;
}

input {
    border: 1px solid #b9cfc5;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 11px 12px;
    width: 100%;
}

select {
    border: 1px solid #b9cfc5;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 11px 12px;
    width: 100%;
}

.form-panel {
    max-width: 980px;
}

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

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

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

.detail-grid dt {
    color: #55716b;
    font-weight: 700;
}

.detail-grid dd {
    margin: 0;
}

.action-row,
.filter-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.inline-filter {
    flex: 1 1 260px;
    margin: 0;
}

input:focus {
    border-color: #0b7a4b;
    box-shadow: 0 0 0 3px rgba(11, 122, 75, .12);
    outline: none;
}

select:focus {
    border-color: #0b7a4b;
    box-shadow: 0 0 0 3px rgba(11, 122, 75, .12);
    outline: none;
}

.validation {
    color: #9f2424;
    display: block;
    font-size: .86rem;
    margin-top: 4px;
}

@media (max-width: 980px) {
    .app-shell,
    .auth-shell-sustainability,
    .content-grid,
    .metric-grid,
    .dashboard-filters,
    .activity-entry-layout,
    .entry-form-grid,
    .selection-list-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: start;
        flex-direction: column;
    }

    .module-summary,
    .module-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sidebar {
        position: static;
    }

    .login-page {
        height: auto;
        min-height: 100vh;
        overflow: auto;
        padding: 0;
    }

    .auth-shell {
        height: auto;
        min-height: 100vh;
    }

    .auth-shell-sustainability {
        border-radius: 0;
        height: auto;
        min-height: 100vh;
        padding: 22px;
    }

    .auth-hero-copy {
        align-self: start;
        padding: 0;
    }

    .auth-hero-copy h1 {
        font-size: 2.8rem;
    }

    .auth-panel-glass {
        justify-self: stretch;
        max-width: none;
        padding: 22px;
    }
}

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

    .topbar,
    .content,
    .app-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .topbar {
        align-items: start;
        flex-direction: column;
        gap: 14px;
    }

    .trend-row,
    .bar-row,
    .compact-bar {
        grid-template-columns: 1fr;
    }

    .trend-row strong,
    .bar-row strong {
        text-align: left;
    }

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