:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #17231d;
    background: #f4f6f1;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --green: #24634a;
    --green-dark: #174b38;
    --ink: #17231d;
    --muted: #68756c;
    --line: #e3e8e0;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 4% 6%, rgba(205, 225, 207, .62), transparent 34rem),
        radial-gradient(ellipse at 98% 96%, rgba(222, 230, 210, .52), transparent 32rem),
        #f4f6f1;
}

a {
    color: inherit;
}

.page-shell {
    display: flex;
    flex-direction: column;
    width: min(100% - 48px, 1120px);
    min-height: 100vh;
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 30px;
    border-bottom: 1px solid rgba(23, 35, 29, .09);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.04em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: var(--green);
    color: #fff;
    font-size: 16px;
    letter-spacing: -.05em;
}

.header-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #5f6d63;
    font-size: 13px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.header-link:hover,
.text-button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

.logout-button,
.text-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #62a676;
    box-shadow: 0 0 0 4px rgba(98, 166, 118, .13);
}

main {
    flex: 1;
    padding-block: clamp(68px, 11vh, 112px) 64px;
}

.welcome {
    max-width: 660px;
    margin-bottom: 46px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(42px, 7vw, 72px);
    font-weight: 680;
    letter-spacing: -.075em;
    line-height: 1.02;
}

h1 span {
    color: var(--green);
}

.intro {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

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

.service-card {
    display: flex;
    min-height: 270px;
    flex-direction: column;
    padding: 26px;
    border: 1px solid rgba(28, 52, 39, .1);
    border-radius: 20px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 36px rgba(26, 46, 33, .045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: rgba(36, 99, 74, .27);
    box-shadow: 0 18px 44px rgba(26, 46, 33, .09);
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.service-icon {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 15px;
}

.service-icon svg {
    width: 29px;
    height: 29px;
}

.icon-gitlab {
    background: #fff1e9;
    color: #e85d2a;
}

.icon-praxis {
    background: #e9f2eb;
    color: var(--green);
}

.card-kicker {
    color: #7b877e;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .1em;
    text-align: right;
    text-transform: uppercase;
}

.card-content {
    margin-block: 26px 22px;
}

.card-content h2 {
    margin: 0 0 9px;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.045em;
}

.card-content p {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.card-link .arrow {
    font-size: 19px;
    line-height: 1;
    transition: transform .18s ease;
}

.card-link:hover .arrow {
    transform: translate(2px, -2px);
}

.card-link:focus-visible,
.brand:focus-visible {
    outline: 3px solid #79ae88;
    outline-offset: 4px;
    border-radius: 4px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 20px 26px;
    border-top: 1px solid rgba(23, 35, 29, .09);
    color: #7b877e;
    font-size: 12px;
    line-height: 1.5;
}

.auth-page {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    padding: 30px 24px 56px;
}

.auth-brand {
    align-self: flex-start;
    width: min(100%, 440px);
    margin: 0 auto 64px;
}

.auth-card {
    width: min(100%, 440px);
    padding: clamp(26px, 6vw, 40px);
    border: 1px solid rgba(28, 52, 39, .1);
    border-radius: 20px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 18px 52px rgba(26, 46, 33, .07);
}

.auth-title {
    margin: 0;
    font-size: clamp(30px, 7vw, 40px);
    font-weight: 680;
    letter-spacing: -.065em;
    line-height: 1.1;
}

.auth-description {
    margin: 13px 0 26px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-form,
.form-field {
    display: flex;
    flex-direction: column;
}

.auth-form {
    gap: 10px;
}

.auth-form label,
.form-field label,
.copy-panel label {
    margin-top: 8px;
    color: #35463a;
    font-size: 13px;
    font-weight: 700;
}

.auth-form input,
.form-field input,
.form-field select,
.copy-panel input,
.copy-panel textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #d9e1d8;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.auth-form input:focus,
.form-field input:focus,
.form-field select:focus,
.copy-panel input:focus,
.copy-panel textarea:focus {
    border-color: #5f9a70;
    box-shadow: 0 0 0 3px rgba(95, 154, 112, .14);
}

.primary-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 12px 18px;
    border: 1px solid var(--green);
    border-radius: 10px;
    background: var(--green);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}

.primary-button:hover {
    transform: translateY(-1px);
    background: var(--green-dark);
}

.button-link {
    width: 100%;
}

.auth-footnote,
.field-hint {
    display: block;
    margin: 18px 0 0;
    color: #78847b;
    font-size: 12px;
    line-height: 1.6;
}

.field-hint {
    margin: -4px 0 4px;
}

.notice {
    margin-block: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.notice-success {
    border: 1px solid #c5e1cb;
    background: #eff8f0;
    color: #245b36;
}

.notice-error {
    border: 1px solid #f0c9bd;
    background: #fff3ef;
    color: #873b28;
}

.admin-main {
    flex: 1;
    padding-block: 62px 54px;
}

.admin-heading {
    max-width: 720px;
    margin-bottom: 32px;
}

.admin-title {
    margin: 0;
    font-size: clamp(36px, 6vw, 58px);
    font-weight: 680;
    letter-spacing: -.07em;
    line-height: 1.05;
}

.admin-panel,
.copy-panel {
    margin-top: 18px;
    padding: 26px;
    border: 1px solid rgba(28, 52, 39, .1);
    border-radius: 18px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 10px 32px rgba(26, 46, 33, .035);
}

.copy-panel {
    border-color: #c5e1cb;
    background: #f7fbf6;
}

.copy-panel h2,
.panel-heading h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.045em;
}

.copy-panel p:not(.eyebrow) {
    margin: 9px 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.copy-panel textarea {
    min-height: 190px;
    margin-top: 8px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
}

.copy-panel input {
    margin-top: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

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

.panel-heading .eyebrow {
    margin-bottom: 8px;
}

.count-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef1ec;
    color: #58665c;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.invite-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(160px, .7fr) auto;
    align-items: end;
    gap: 14px;
}

.form-field label {
    margin: 0 0 8px;
}

.invite-form .primary-button {
    margin: 0;
    white-space: nowrap;
}

.table-scroll {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th,
.admin-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e9ede7;
    font-size: 13px;
    vertical-align: middle;
}

.admin-table th {
    color: #758178;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.admin-table td:first-child,
.admin-table th:first-child {
    padding-left: 0;
}

.admin-table td:last-child,
.admin-table th:last-child {
    padding-right: 0;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.status-pill.is-active {
    background: #e9f5eb;
    color: #28633a;
}

.status-pill.is-disabled {
    background: #f0f1ef;
    color: #69736c;
}

.table-action {
    text-align: right;
    white-space: nowrap;
}

.text-button {
    color: #416d50;
    font-size: 12px;
    font-weight: 750;
}

.muted,
.empty-state {
    color: #7b877e;
    font-size: 13px;
}

.empty-state {
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 32px, 520px);
    }

    .site-header {
        padding-block: 22px;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px 14px;
    }

    .header-label {
        display: none;
    }

    main {
        padding-block: 68px 44px;
    }

    .welcome {
        margin-bottom: 32px;
    }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .service-card {
        min-height: 250px;
        padding: 23px;
    }

    .site-footer {
        flex-direction: column;
        gap: 7px;
        padding-bottom: 20px;
    }

    .auth-page {
        padding: 22px 16px 36px;
    }

    .auth-brand {
        margin-bottom: 42px;
    }

    .admin-main {
        padding-block: 48px 38px;
    }

    .admin-panel,
    .copy-panel {
        padding: 20px 16px;
    }

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

    .invite-form .primary-button {
        width: 100%;
    }

    .admin-table th,
    .admin-table td {
        padding: 11px 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
