html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f3f5f7;
    color: #17212b;
    margin: 0;
}

a, .btn-link {
    color: #9f1c20;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
    /* A button's text never wraps ("Lataa / CSV"); a row of them makes
       room by moving the button, not by squeezing it. */
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    color: #fff;
    background-color: #1d2733;
    border-color: #1d2733;
}

/* The other buttons are quiet: white with a thin edge, red on hover. */
.btn-secondary {
    color: #17212b;
    background-color: #fff;
    border-color: #c8d1db;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    color: #9f1c20;
    background-color: #fff;
    border-color: #9f1c20;
}

.btn-secondary:active {
    color: #7a1518;
    background-color: #fdf1f1;
    border-color: #9f1c20;
}

.btn-primary:hover {
    color: #fff;
    background-color: #2a3745;
    border-color: #2a3745;
}

.btn-outline-primary {
    color: #1d2733;
    background: #fff;
    border-color: #c8d1db;
}

.btn-outline-primary:hover {
    color: #1d2733;
    background: #f3f5f7;
    border-color: #1d2733;
}

.btn-outline-primary:active,
.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
    color: #1d2733;
    background: #f3f5f7;
    border-color: #1d2733;
}

.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary,
.show > .btn-outline-primary.dropdown-toggle {
    color: #1d2733;
    background: #f3f5f7;
    border-color: #1d2733;
    box-shadow: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(29, 39, 51, 0.24);
}

.app-shell {
    min-height: 100vh;
}

.app-shell-admin {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
}

.app-shell-workspace {
    display: block;
    background: #eef2f6;
}

.app-shell-workspace .app-topbar {
    min-height: 6.6rem;
    padding: 0.95rem 1.5rem;
    background: #9f1c20;
    border-bottom: 0;
}

.app-sidebar {
    min-height: 100vh;
    background: #17212b;
    border-right: 1px solid #263442;
}

.app-main {
    min-width: 0;
}

.content {
    padding: 1.5rem;
}

.app-shell-workspace .content {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.app-topbar {
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d8dee4;
    background: #fff;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.95rem;
}

.topbar-copy span {
    color: #5f6b76;
}

.workspace-topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.workspace-brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.workspace-desktop-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.workspace-desktop-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0 1.2rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.98rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.workspace-desktop-link.active {
    background: #fff;
    color: #9f1c20;
}

.workspace-desktop-link.active:hover {
    color: #9f1c20;
}

.workspace-desktop-link:hover {
    color: #fff;
}

.workspace-user-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.workspace-user-chip:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.workspace-user-chip.active {
    background: #fff;
    border-color: #fff;
    color: #9f1c20;
}

.workspace-user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

.workspace-user-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.workspace-user-name {
    line-height: 1;
}

.workspace-menu-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    list-style: none;
    text-decoration: none;
}

.workspace-menu-button::-webkit-details-marker {
    display: none;
}

.workspace-menu-button span {
    display: block;
    width: 1.55rem;
    height: 0.16rem;
    background: currentColor;
    border-radius: 999px;
}

.workspace-menu {
    position: relative;
}

.workspace-menu[open] .workspace-menu-button {
    background: rgba(255, 255, 255, 0.1);
}

.workspace-menu-popover {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 14rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(23, 33, 43, 0.2);
}

.workspace-menu-link {
    display: block;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    color: #17212b;
    font-weight: 700;
    text-decoration: none;
}

.workspace-menu-link.active,
.workspace-menu-link:hover {
    background: #f5f7fa;
    color: #9f1c20;
}

.workspace-menu-link-secondary {
    color: #8f1d1d;
}

.workspace-brand,
.nav-brand {
    color: #17212b;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
}

/* "Team" beside the name: the office is the team service, not the
   phone's own Joppii. */
.brand-team {
    display: inline-block;
    margin-left: 0.15rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #ffffff;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: 0.15em;
}

.workspace-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.workspace-brand {
    display: inline-flex;
    align-items: center;
    min-height: 4.55rem;
    padding: 0 1rem;
    border-radius: 22px;
    background: #39262d;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
}

.workspace-meta strong,
.workspace-meta span {
    color: #fff;
}

.workspace-meta span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.25rem 1rem 1rem;
    color: #d6dde5;
}

.nav-brand-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 0.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-brand {
    color: #fff;
}

.nav-user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: #d6dde5;
    font-size: 0.9rem;
}

.nav-org-name {
    color: #9fb0c2;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.25rem 0;
}

.nav-links .nav-link,
.nav-footer .nav-link {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    color: #d6dde5;
    text-decoration: none;
    font-weight: 600;
}

.nav-links .nav-link.active {
    background: #243240;
    color: #fff;
}

.nav-links .nav-link:hover,
.nav-footer .nav-link:hover {
    background: #1e2a36;
    color: #fff;
}

.nav-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link-secondary {
    color: #9fb0c2;
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.summary-panel,
.dashboard-section,
.login-panel {
    background: #fff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
}

.summary-panel {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.summary-label,
.summary-meta,
.muted-copy {
    color: #5f6b76;
}

.summary-panel strong {
    font-size: 1.6rem;
    line-height: 1.1;
}

.dashboard-content {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: 1rem;
}

.workspace-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.field-work-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-work-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.field-work-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.field-work-title-row h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
}

.field-work-count {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid #d8dee4;
    border-radius: 999px;
    background: #fff;
    color: #5f6b76;
    font-size: 0.9rem;
    font-weight: 700;
}

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

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: 1rem;
}

.workspace-create-panel {
    padding: 1rem 1.1rem;
}

.field-work-create-button {
    flex: 0 0 auto;
    min-height: 2.8rem;
    border-radius: 999px;
    white-space: nowrap;
}

.workspace-create-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.workspace-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.workspace-job-link {
    display: block;
    color: #17212b;
    text-decoration: none;
}

.workspace-job-link:hover {
    color: #9f1c20;
}

.workspace-sidepanel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.workspace-jobs-panel {
    min-width: 0;
}

.workspace-toolbar {
    margin-bottom: 1rem;
}

.workspace-jobs-meta {
    color: #5f6b76;
    font-size: 0.92rem;
    font-weight: 600;
}

.workspace-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.workspace-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.status-filter-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.35rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid #d8dee4;
    border-radius: 999px;
    background: #eef1f4;
    color: #17212b;
    text-align: left;
    font-weight: 700;
}

.status-filter-button strong {
    font-size: 1rem;
}

.status-filter-button-active {
    border-color: #9f1c20;
    background: #9f1c20;
    color: #fff;
}

.workspace-job-primary {
    font-weight: 600;
}

.job-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.job-status-new {
    background: #b32121;
    color: #fff;
    border-color: #d46e6e;
}

.job-status-in-progress {
    background: #fff4df;
    color: #8a5a00;
    border-color: #efd49a;
}

.job-status-completed {
    background: #e9f9ef;
    color: #17663a;
    border-color: #bfe7cc;
}

.job-status-approved {
    background: #ecebff;
    color: #4f46b5;
    border-color: #d1cdf9;
}

.job-status-default {
    background: #f3f5f7;
    color: #44515c;
    border-color: #d8dee4;
}

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

.dashboard-section {
    padding: 1rem 1.1rem;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* The text gives way first; on a narrow screen the buttons go below it. */
.section-header > :first-child {
    flex: 1 1 20rem;
    min-width: 0;
}

.dashboard-section h2 {
    font-size: 1rem;
    margin-bottom: 0.9rem;
}

.section-header h2 {
    margin-bottom: 0.25rem;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-item {
    padding: 0.3rem 0.55rem;
    border: 1px solid #d8dee4;
    border-radius: 999px;
    background: #f8fafc;
    font-size: 0.88rem;
}

.jobs-table-wrapper {
    overflow-x: auto;
}

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

.jobs-table th,
.jobs-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e7edf3;
    text-align: left;
    vertical-align: middle;
}

.jobs-table th {
    color: #5f6b76;
    font-size: 0.85rem;
    font-weight: 600;
}

.workspace-job-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.workspace-job-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e7edf3;
}

.workspace-job-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.workspace-job-row-main {
    min-width: 0;
}

.workspace-job-row-title {
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.workspace-job-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.25rem;
    color: #5f6b76;
    font-size: 0.9rem;
}

.workspace-job-row-meta span + span::before {
    content: "•";
    margin-right: 0.75rem;
    color: #c2c9d1;
}

.workspace-job-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.workspace-job-cost {
    color: #5f6b76;
    font-size: 0.9rem;
    font-weight: 600;
}

.workspace-job-open {
    font-size: 0.92rem;
}

.field-work-panel {
    border-radius: 18px;
    padding: 1rem;
}

.field-work-toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.field-job-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.field-job-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #f3cf64;
    border-radius: 20px;
    background: #fff5c7;
    color: #17212b;
    overflow: hidden;
}

.field-job-card-link {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem 1rem 0.9rem;
    color: inherit;
    text-decoration: none;
}

.field-job-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.field-job-date {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.1rem 0.45rem;
    border: 1px solid #e7b820;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    font-weight: 700;
}

.field-job-title {
    color: #17212b;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.18;
    text-decoration: none;
    word-break: break-word;
}

.field-job-card-link:hover .field-job-title {
    color: #9f1c20;
}

.field-job-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #44515c;
    font-size: 0.82rem;
    font-weight: 600;
}

.field-job-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    color: #6d7480;
    flex: 0 0 auto;
}

.field-job-meta-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.field-job-description {
    margin: 0;
    max-height: 6.5rem;
    overflow-y: auto;
    padding-right: 0.15rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.18;
}

.field-job-cost {
    padding-top: 0.05rem;
    color: #44515c;
    font-size: 0.82rem;
    font-weight: 700;
}

.field-job-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(159, 28, 32, 0.18);
}

.field-job-footer-label {
    display: block;
    color: #5f6b76;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.field-job-assignee {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    margin-top: 0.15rem;
    font-size: 0.88rem;
}

.field-job-open-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.05rem;
    padding: 0 1.1rem;
    border: 1px solid #e7b820;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: #b32121;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.field-job-card-link:hover .field-job-open-button {
    background: #fff;
    border-color: #d8aa1f;
}

.field-bottom-bar {
    display: none;
}

.placeholder-panel {
    min-height: 14rem;
}

.placeholder-copy {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 34rem;
}

.placeholder-copy h2,
.placeholder-copy p {
    margin: 0;
}

.profile-grid {
    display: grid;
    gap: 1rem;
}

.profile-grid-constrained {
    max-width: 880px;
}

.profile-card {
    padding: 1.2rem 1.25rem;
}

.profile-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
}

.profile-card-title-accent {
    color: #9f1c20;
}

.profile-card-subtitle {
    margin: 0.2rem 0 0;
    color: #5f6b76;
    font-size: 0.93rem;
}

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.profile-summary-item {
    min-width: 0;
}

.profile-summary-label {
    display: block;
    margin-bottom: 0.25rem;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.profile-summary-value {
    font-size: 1rem;
    font-weight: 700;
    word-break: break-word;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid #eceff3;
}

.profile-password-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 28rem;
}

.profile-password-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.25rem;
}

.workspace-feedback {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    background: #f0fdf4;
    color: #166534;
    font-size: 0.875rem;
    font-weight: 500;
}

.workspace-feedback-error {
    border-color: #fee2e2;
    background: #fef2f2;
    color: #991b1b;
}

.workspace-panel {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 0.75rem;
    box-sizing: border-box;
}

.workspace-panel-soft {
    background: #fafafa;
}

.workspace-panel-padded {
    padding: 1.25rem;
}

.workspace-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.workspace-field-label {
    display: block;
    color: #52525b;
    font-size: 0.8rem;
    font-weight: 700;
}

.workspace-control,
.workspace-select,
.workspace-textarea {
    width: 100%;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    background: #fff;
    color: #09090b;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.workspace-control,
.workspace-select {
    min-height: 2.65rem;
    padding: 0.65rem 0.75rem;
}

.workspace-textarea {
    padding: 0.6rem 0.75rem;
    resize: none;
}

.workspace-form-actions {
    display: flex;
    gap: 0.5rem;
}

.workspace-form-actions .btn {
    min-height: 2.65rem;
    border-radius: 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.workspace-form-actions .btn-full {
    flex: 1 1 0;
}

.workspace-pill-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.workspace-pill-button {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border: 0;
    background: none;
    color: #71717a;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.workspace-pill-meta {
    min-width: 120px;
    text-align: center;
}

.workspace-pill-label {
    display: block;
    color: #a1a1aa;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.workspace-pill-value {
    color: #09090b;
    font-size: 1.02rem;
    font-weight: 700;
    white-space: nowrap;
}

.workspace-inline-note {
    color: #71717a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.workspace-section-label {
    color: #52525b;
    font-size: 0.92rem;
    font-weight: 800;
}

.time-entry-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

.time-calendar-panel {
    width: 100%;
    max-width: 750px;
    padding: 1.25rem;
}

.time-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.6rem;
    color: #71717a;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.time-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.375rem;
}

.time-calendar-day {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 1;
    padding: 0.25rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.375rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-calendar-day.is-outside {
    border-color: #f4f4f5;
    background: #fafafa;
    opacity: 0.4;
}

.time-calendar-day.is-complete {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.time-calendar-day.is-near-complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.time-calendar-day.is-partial {
    border-color: #fde68a;
    background: #fffbeb;
}

.time-calendar-day.is-weekend {
    border-color: #e4e4e7;
    background: #f4f4f5;
}

.time-calendar-day.is-today {
    border-width: 2px;
    border-color: #09090b;
}

.time-calendar-day.is-selected {
    border-width: 2px;
    border-color: #b91c1c;
    box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.1);
}

.time-calendar-day-number {
    color: #09090b;
    font-size: 0.92rem;
    font-weight: 600;
}

.time-calendar-day.is-outside .time-calendar-day-number {
    color: #a1a1aa;
}

.time-calendar-day.is-complete .time-calendar-day-number {
    color: #047857;
}

.time-calendar-day.is-near-complete .time-calendar-day-number {
    color: #15803d;
}

.time-calendar-day.is-partial .time-calendar-day-number {
    color: #b45309;
}

.time-calendar-day.is-weekend .time-calendar-day-number {
    color: #71717a;
}

.time-calendar-day.is-today:not(.is-selected) .time-calendar-day-number {
    color: #b91c1c;
    font-weight: 800;
}

.time-calendar-hours {
    color: #09090b;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.time-calendar-hours small {
    font-size: 0.62rem;
    font-weight: 600;
}

.time-calendar-day.is-complete .time-calendar-hours {
    color: #047857;
}

.time-calendar-day.is-near-complete .time-calendar-hours {
    color: #15803d;
}

.time-calendar-day.is-partial .time-calendar-hours {
    color: #b45309;
}

.time-calendar-day.is-weekend .time-calendar-hours,
.time-calendar-day.is-outside .time-calendar-hours {
    color: #71717a;
}

.time-entry-sidebar {
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.time-entry-sidebar-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e4e4e7;
}

.time-entry-sidebar-title {
    margin: 0.15rem 0 0;
    color: #09090b;
    font-size: 1.25rem;
    font-weight: 800;
}

.time-entry-list-title {
    margin-bottom: 0.5rem;
}

.time-entry-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.time-entry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    background: #fafafa;
    font-size: 0.92rem;
}

.time-entry-card-main {
    min-width: 0;
    flex: 1;
}

.time-entry-card-title {
    color: #09090b;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-entry-card-description {
    display: block;
    margin-top: 0.08rem;
    color: #52525b;
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-entry-card-side {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.time-entry-hours-pill {
    padding: 0.18rem 0.45rem;
    border-radius: 0.3rem;
    background: #e4e4e7;
    color: #09090b;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.time-entry-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem;
    border: 0;
    background: none;
    color: #ef4444;
    cursor: pointer;
    transition: color 0.1s ease;
}

.time-entry-delete:hover {
    color: #dc2626;
}

.time-entry-delete svg {
    width: 0.9375rem;
    height: 0.9375rem;
}

.time-entry-form-title {
    margin-top: 1rem;
    margin-bottom: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e4e4e7;
    color: #b91c1c;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.time-entry-form-title.is-first {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.time-entry-hours-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.time-entry-type-grid {
    grid-template-columns: 1fr;
}

.time-entry-description-block {
    margin-bottom: 1rem;
}

.time-report-filter-panel {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.time-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: flex-end;
}

.time-report-filter-submit {
    width: 100%;
}

.time-report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.time-report-summary-card {
    padding: 1rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    background: #fafafa;
    text-align: center;
}

.time-report-summary-card.is-accent {
    border-color: #fee2e2;
    background: #fef2f2;
}

.time-report-summary-label {
    color: #52525b;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.time-report-summary-card.is-accent .time-report-summary-label {
    color: #b91c1c;
}

.time-report-summary-value {
    margin-top: 0.25rem;
    color: #09090b;
    font-size: 2.25rem;
    font-weight: 900;
}

.time-report-summary-value span {
    color: #71717a;
    font-size: 1rem;
    font-weight: 500;
}

.time-report-table-panel {
    padding: 1rem;
    overflow-x: auto;
}

.time-report-empty {
    padding: 3rem 1rem;
    color: #71717a;
    text-align: center;
}

.time-report-empty svg {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: #d4d4d8;
}

.time-report-empty h3 {
    margin-bottom: 0.25rem;
    color: #09090b;
    font-size: 1.125rem;
    font-weight: 600;
}

.time-report-empty p {
    font-size: 0.875rem;
}

.time-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.time-report-table th {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e4e4e7;
    color: #52525b;
    font-weight: 700;
}

.time-report-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f4f4f5;
    color: #09090b;
}

.time-report-table tbody tr {
    transition: background-color 0.1s ease;
}

.time-report-table tbody tr:hover {
    background: #fafafa;
}

.time-report-date,
.time-report-user {
    white-space: nowrap;
}

.time-report-type {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.time-report-description {
    color: #52525b;
    font-size: 0.92rem;
}

.time-report-hours {
    text-align: right;
    font-family: monospace;
    font-weight: 700;
}

.workspace-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.workspace-pagination-info {
    color: #44515c;
    font-size: 0.95rem;
    font-weight: 700;
}

.job-detail-hero {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
}

.job-detail-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.job-detail-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.job-detail-date {
    color: #5f6b76;
    font-size: 0.9rem;
    font-weight: 600;
}

.job-detail-back-link {
    min-height: 2rem;
    padding: 0.2rem 0.8rem;
    background: #fff;
    border-color: #d8dee4;
    color: #1d2733;
}

.job-detail-back-link:hover {
    background: #f3f5f7;
    border-color: #c8d1db;
    color: #1d2733;
}

.job-detail-title {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.2rem);
    line-height: 1.15;
    word-break: break-word;
}

.job-detail-contact {
    margin: -0.3rem 0 0;
    color: #44515c;
    font-size: 1rem;
    font-weight: 600;
}

.job-detail-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding-top: 0.2rem;
    border-top: 1px solid rgba(159, 28, 32, 0.14);
}

.job-detail-hero-item {
    min-width: 0;
}

.job-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 28rem);
    gap: 1rem;
    align-items: start;
}

.job-detail-main,
.job-detail-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.job-detail-panel {
    padding: 0.9rem 1rem;
}

.job-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.job-detail-section-header {
    margin-bottom: 0.75rem;
}

.job-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.job-edit-field-full {
    grid-column: 1 / -1;
}

.job-detail-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.job-detail-savebar {
    padding: 1rem;
}

.job-detail-savebar .section-header {
    align-items: center;
    margin-bottom: 0;
}

.job-detail-savebar h2 {
    margin: 0;
    font-size: 0.95rem;
}

.job-detail-savebar .workspace-create-actions {
    margin-left: auto;
    align-items: center;
}

.job-detail-more {
    margin-top: 1rem;
    padding: 0;
    overflow: hidden;
}

.job-detail-more-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
    list-style: none;
    user-select: none;
}

.job-detail-more-toggle::-webkit-details-marker {
    display: none;
}

.job-detail-more-toggle::after {
    content: "+";
    font-size: 1.15rem;
    line-height: 1;
    color: #9a1d1d;
}

.job-detail-more[open] .job-detail-more-toggle {
    border-bottom: 1px solid #e7edf3;
}

.job-detail-more[open] .job-detail-more-toggle::after {
    content: "-";
}

.job-detail-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid #e7edf3;
    border-radius: 18px;
    background: #f8fafc;
}

.job-detail-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.job-detail-summary-row span {
    color: #5f6b76;
}

.job-detail-secondary {
    padding: 1rem;
}

.job-detail-more-header {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
}

.job-detail-block {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e7edf3;
}

.job-detail-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.job-detail-copy {
    margin: 0.25rem 0 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detail-list-body {
    min-width: 0;
}

.detail-list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e7edf3;
}

.detail-list-row:last-child {
    border-bottom: 0;
}

.detail-list-subline {
    margin-top: 0.1rem;
    color: #5f6b76;
    font-size: 0.88rem;
}

.detail-list-meta {
    color: #5f6b76;
    font-size: 0.78rem;
    white-space: nowrap;
    text-align: right;
}

.job-detail-empty-state {
    margin-top: 1rem;
}

.job-detail-note {
    margin-top: 0.2rem;
    white-space: pre-wrap;
    line-height: 1.3;
    color: #283341;
}

.job-detail-label-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.job-detail-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d8dee4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(23, 33, 43, 0.05);
}

.job-detail-label-text {
    line-height: 1.4;
    word-break: break-word;
}

.detail-row-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid #d8dee4;
    border-radius: 6px;
    background: #fff;
    color: #8f1d1d;
    padding: 0;
}

.icon-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button:hover {
    border-color: #c9d2db;
    background: #fff5f5;
}

.table-actions {
    text-align: right;
}

.table-link {
    color: #9f1c20;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-state {
    padding: 1rem 0;
    color: #5f6b76;
}

.dashboard-state-error,
.login-error {
    color: #8f1d1d;
}

.login-shell {
    min-height: calc(100vh - 6rem);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.login-panel {
    width: min(100%, 26rem);
    padding: 1.5rem;
}

.login-brand {
    font-size: 0.85rem;
    font-weight: 700;
    color: #5f6b76;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.login-brand-large {
    color: #1d2733;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
    margin-bottom: 0.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.login-field input,
.login-field select,
.login-field textarea {
    min-height: 2.75rem;
    border: 1px solid #c8d1db;
    border-radius: 6px;
    padding: 0.65rem 0.8rem;
    background: #fff;
    color: #17212b;
}

.login-submit {
    min-height: 2.75rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

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

.feature-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #17212b;
}

.feature-checkbox input[type=checkbox] {
    accent-color: #b32121;
}

.feature-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* With labelled fields, the buttons sit on the fields' line. */
.admin-search-row:has(> .login-field) {
    align-items: flex-end;
}

/* Vahvista lasku: the date, its button and Poista luonnos on one line,
   the buttons as tall as the date field. */
.invoice-issue-row {
    align-items: flex-end;
}

.invoice-issue-row > form {
    margin-bottom: 0;
}

.invoice-issue-row .btn {
    min-height: 2.75rem;
}

.admin-search {
    min-height: 2.75rem;
    flex: 1 1 auto;
    border: 1px solid #c8d1db;
    border-radius: 6px;
    padding: 0.65rem 0.8rem;
    background: #fff;
}

/* What stopped a form: the same box as a failed save's flash, so it is
   seen at once, with what was typed still in the fields below. */
.inline-feedback {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #f3c7c7;
    border-left: 4px solid #b91c1c;
    border-radius: 12px;
    background: #fdf1f1;
    color: #5c1414;
    font-size: 0.95rem;
    font-weight: 600;
}

/* A text field inside a table row (invoice lines, monthly lines). */
.table-input {
    min-height: 2.35rem;
    width: 100%;
    border: 1px solid #c8d1db;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    background: #fff;
    color: #17212b;
}

.table-select {
    min-height: 2.35rem;
    width: 100%;
    border: 1px solid #c8d1db;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    background: #fff;
}

.table-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.generated-link-box {
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #d8dee4;
    border-radius: 6px;
}

.generated-link-url {
    margin-top: 0.35rem;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.metric-inline {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

@media (max-width: 900px) {
    .app-shell-admin {
        grid-template-columns: 1fr;
    }

    .app-shell-workspace {
        min-height: 100vh;
        background: #eef2f6;
    }

    .app-sidebar {
        min-height: auto;
    }

    .nav-shell {
        min-height: auto;
    }

    .app-shell-workspace .app-topbar {
        min-height: 6.6rem;
        padding: 0.95rem 1rem;
        background: #9f1c20;
        border-bottom: 0;
        position: static;
    }

    .workspace-topbar {
        align-items: center;
    }

    .workspace-brand-block {
        align-items: center;
        gap: 0.75rem;
    }

    .workspace-desktop-nav,
    .workspace-user-chip {
        display: none;
    }

    .dashboard-summary,
    .dashboard-content,
    .workspace-grid,
    .admin-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .workspace-create-grid {
        grid-template-columns: 1fr;
    }

    .job-detail-body {
        grid-template-columns: 1fr;
    }

    .job-detail-main {
        order: 2;
    }

    .job-detail-side {
        order: 1;
    }

    .job-detail-hero-top {
        align-items: stretch;
    }

    .job-detail-back-link {
        align-self: flex-start;
    }

    .admin-search-row,
    .admin-search-row:has(> .login-field) {
        flex-direction: column;
        align-items: stretch;
    }

    .app-topbar {
        padding: 1rem;
    }

    .content,
    .app-shell-workspace .content {
        width: auto;
        margin: 0;
        padding: 1rem 0.75rem 5.5rem;
    }

    .workspace-shell {
        gap: 0.9rem;
    }

    .field-work-header {
        padding: 0.25rem 0.55rem 0;
    }

    .field-work-title-row h1 {
        font-size: 1.85rem;
    }

    .field-work-panel {
        border-radius: 18px;
        padding: 1rem;
    }

    .field-job-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .job-detail-hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .field-work-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .field-work-create-button {
        width: 100%;
    }

    .workspace-status-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.1rem;
    }

    .status-filter-button {
        flex: 0 0 auto;
        min-height: 2.05rem;
        padding: 0.35rem 0.75rem;
        white-space: nowrap;
    }

    .field-job-list {
        grid-template-columns: 1fr;
    }

    .field-work-toolbar .admin-search {
        min-height: 3.1rem;
        border-radius: 14px;
    }

    .field-job-card {
        border-radius: 20px;
        padding: 1rem;
    }

    .field-job-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .job-detail-panel {
        padding: 0.85rem 0.9rem;
    }

    .job-edit-grid {
        grid-template-columns: 1fr;
    }

    .job-detail-add-row {
        grid-template-columns: 1fr;
    }

    .job-detail-summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .field-job-title {
        font-size: 1.15rem;
    }

    .workspace-job-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .time-entry-hours-grid,
    .profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .workspace-job-row-side {
        align-items: flex-start;
    }

    .detail-list-row {
        flex-direction: column;
    }

    .detail-list-meta {
        white-space: normal;
    }

    .detail-row-actions {
        align-self: flex-end;
    }

}

@media (min-width: 480px) {
    .time-entry-hours-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .time-entry-layout.has-selection {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

@media (min-width: 901px) {
    .workspace-menu {
        display: none;
    }
}

/* The pages under Asetukset: Yritys, Käyttäjät, Pikavalinnat. */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.settings-tab.active {
    border-color: #9f1c20;
    background: #9f1c20;
    color: #fff;
}

.preset-group-title {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.05rem;
}

.preset-group-title .muted-copy {
    margin-left: 0.35rem;
    font-weight: 400;
}

/* The groups' columns line up under each other. */
.preset-table {
    table-layout: fixed;
}

.preset-table th:nth-child(1) {
    width: 55%;
}

/* ---- Brand mark in the top bar ---- */
.workspace-brand {
    gap: 0.6rem;
    text-decoration: none;
}

.workspace-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.55);
}

/* ---- Sign-in ---- */
/* The whole window, past the content column of the layout. */
/* Centred while it fits; taller than the window (a phone, its toolbars,
   the keyboard) it starts at the top and scrolls to its end: "center"
   would push the top out of reach. The bottom keeps clear of the home
   indicator. */
.login-shell {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 2rem 1rem calc(2.5rem + env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 15% 10%, rgba(159, 28, 32, 0.16), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(29, 39, 51, 0.10), transparent 45%),
        #eef2f6;
}

.login-card {
    margin-top: auto;
    width: min(100%, 56rem);
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px -40px rgba(23, 33, 43, 0.45);
}

.login-hero {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 2.5rem 2.25rem;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.14), transparent 45%),
        linear-gradient(160deg, #b0221f 0%, #8d171a 100%);
}

.login-hero-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
}

.login-hero-name {
    margin-top: 0.4rem;
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.login-hero-copy {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

.login-hero-points {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.login-hero-points li {
    position: relative;
    padding-left: 1.6rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
}

.login-hero-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 900;
}

.login-form-side {
    padding: 2.5rem 2.25rem;
}

.login-form-side h1 {
    margin: 0 0 0.35rem;
    font-size: 1.7rem;
    font-weight: 800;
}

.login-form-side .login-submit {
    margin-top: 0.4rem;
    min-height: 3rem;
    background: #9f1c20;
    border-color: #9f1c20;
    border-radius: 10px;
    font-size: 1rem;
}

.login-form-side .login-submit:hover {
    background: #86171a;
    border-color: #86171a;
    color: #fff;
}

.login-form-side .login-field input {
    min-height: 3rem;
    border-radius: 10px;
}

.login-form-side .login-field input:focus {
    outline: none;
    border-color: #9f1c20;
    box-shadow: 0 0 0 3px rgba(159, 28, 32, 0.15);
}

.login-error {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #fdecec;
}

.login-help {
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    color: #5f6b76;
}

.login-shell > :last-child {
    margin-bottom: auto;
}

/* Never squeezed to the window's height: the card would clip its own
   bottom (the form) instead of the page scrolling. */
.login-shell > * {
    flex-shrink: 0;
}

.login-footer {
    margin: 0;
    font-size: 0.85rem;
    color: #5f6b76;
}

@media (max-width: 760px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-shell {
        padding-top: 1rem;
    }

    /* On a phone the red part is a header, not half the screen. */
    .login-hero {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 0.9rem;
        padding: 1.1rem 1.25rem;
    }

    .login-hero-mark {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .login-hero-name {
        margin-top: 0;
        font-size: 1.45rem;
    }

    .login-hero-copy {
        flex-basis: 100%;
        font-size: 0.95rem;
    }

    .login-hero-points {
        display: none;
    }

    .login-form-side {
        padding: 1.4rem 1.25rem;
    }
}

/* ---- Subscriptions (Ylläpito, the office notice) ---- */
.sub-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.sub-pill-active {
    background: #e6f4ea;
    color: #1e6b34;
}

.sub-pill-trial {
    background: #e7f1fb;
    color: #1d5a91;
}

.sub-pill-off {
    background: #fdecec;
    color: #8f1d1d;
}

.subscription-notice {
    width: min(1180px, calc(100% - 3rem));
    margin: 1.25rem auto 0;
    padding: 0.9rem 1.1rem;
    border: 1px solid #f3c7c7;
    border-radius: 12px;
    background: #fdf1f1;
    color: #5c1414;
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.admin-inline-form select {
    min-height: 2.25rem;
    border: 1px solid #c8d1db;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    background: #fff;
}

.admin-subtitle {
    margin: 1.75rem 0 0.75rem;
    font-size: 1.05rem;
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.login-card-single {
    width: min(100%, 28rem);
    grid-template-columns: 1fr;
}

.login-single-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    font-weight: 900;
}

.login-form-side a.login-submit {
    width: 100%;
    margin-top: 1rem;
    color: #fff;
}

/* ---- Keikat ---- */
.jobs-week-label {
    align-self: center;
}

.jobs-day-title {
    margin: 1.25rem 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: capitalize;
    color: #5f6b76;
}

.jobs-day-today {
    color: #9f1c20;
}

.jobs-day-late {
    color: #8f1d1d;
    text-transform: none;
}

.jobs-empty {
    margin: 0 0 0.25rem;
}

.jobs-row {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}


/* The whole card opens the keikka; "Tehty" is a small button in its
   last column. The link's own box is dissolved so its parts are the
   card's grid cells and stay clickable. */
.jobs-row {
    grid-template-columns: 6rem minmax(0, 1fr) auto auto;
}

.jobs-row-link {
    display: contents;
    color: inherit;
    text-decoration: none;
}

.jobs-row:has(.jobs-row-link:hover) {
    border-color: #9f1c20;
}

.jobs-row-done {
    margin: 0;
}

.jobs-row-done .btn {
    white-space: nowrap;
    border-radius: 999px;
}

.jobs-row-time {
    font-weight: 800;
    color: #1d5a91;
}

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

.jobs-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    text-align: right;
}

.jobs-assignee {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #eef2f6;
    font-size: 0.85rem;
    font-weight: 700;
}

.jobs-assignee-none {
    background: #fff4e5;
    color: #8a5300;
}

@media (max-width: 640px) {
    .jobs-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .jobs-row-done {
        justify-self: start;
    }

    .jobs-row-meta {
        align-items: flex-start;
        text-align: left;
    }
}

/* What a fixed price took off the bill: shown, quietly. */
.replaced-lines .jobs-table td {
    color: #5f6b76;
}

/* A message carried over a form's redirect (Services/Flash.cs). */
.flash-notice {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #bfe3c8;
    border-radius: 12px;
    background: #eef9f1;
    color: #1e4d2b;
}

.flash-notice-error {
    border-color: #f3c7c7;
    background: #fdf1f1;
    color: #5c1414;
}

.flash-notice .generated-link-url {
    margin-top: 0.5rem;
}

/* Profiili: the facts and the password side by side on a wide screen. */
.profile-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

@media (min-width: 900px) {
    .profile-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.profile-columns > .dashboard-section {
    margin: 0;
}

.profile-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.6rem 1.5rem;
    margin: 0 0 1.25rem;
}

.profile-facts dt {
    color: #5f6b76;
    font-weight: 500;
}

.profile-facts dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Keikka: its members as tickable chips; none ticked is everyone's. */
.assignee-field {
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}

.assignee-field legend {
    float: none;
    width: auto;
    margin-bottom: 0.45rem;
    font-size: inherit;
}

.assignee-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.assignee-pick {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    line-height: 1.3;
    border: 1px solid #d5dce3;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.assignee-pick:has(input:checked) {
    border-color: #9f1c20;
    background: #fdf1f1;
    color: #7a1518;
    font-weight: 600;
}

/* Not a text field: none of the form fields' height or padding. */
.login-field .assignee-pick input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: #9f1c20;
}

/* A password field with its eye (forms.js). Edge's own eye is hidden,
   so there is one; other browsers show none of their own. */
.password-field {
    position: relative;
    display: flex;
}

.password-field input {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 2.75rem;
}

.password-reveal {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #55606c;
    cursor: pointer;
}

.password-reveal:hover,
.password-reveal:focus-visible {
    color: #17212b;
    background: #eef1f4;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* A saved logo, seen where it is set. */
.logo-preview {
    display: block;
    max-width: 240px;
    max-height: 96px;
    margin: 0.25rem 0 0.75rem;
    padding: 0.5rem;
    border: 1px solid #e3e5e8;
    border-radius: 6px;
    background: #fff;
}

/* Tunnit: a member's month at a glance, then its days line by line. */
.timesheet-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}

.timesheet-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timesheet-month {
    min-width: 9rem;
    text-align: center;
}

.timesheet-summary {
    display: grid;
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    margin: 0.5rem 0 1.25rem;
}

.timesheet-total {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 1.25rem;
    border: 1px solid #f1c9c4;
    border-radius: 10px;
    background: linear-gradient(135deg, #fdecea, #fff);
}

.timesheet-total-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b3261e;
}

.timesheet-total-value {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.1;
}

.timesheet-chips {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.5rem;
}

.timesheet-chip {
    display: inline-flex;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.45rem 0.8rem;
    border: 1px solid #d8dee4;
    border-radius: 999px;
    background: #f7f9fb;
    color: #5f6b76;
    white-space: nowrap;
}

.timesheet-chip strong {
    color: #17212b;
}

.timesheet-rows .timesheet-day-start td {
    border-top: 2px solid #d8dee4;
}

.timesheet-rows td:first-child {
    white-space: nowrap;
    font-weight: 600;
}

.timesheet-kind {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: #eef1f4;
    color: #34404b;
    white-space: nowrap;
}

.timesheet-kind-visit { background: #e6f4ea; color: #1e6b34; }
.timesheet-kind-work { background: #e3f2f2; color: #1b5e5e; }
.timesheet-kind-fix { background: #fff4d6; color: #7a5a00; }
.timesheet-kind-travel { background: #e8f0fb; color: #1f4f8f; }
.timesheet-kind-vacation,
.timesheet-kind-sick-leave,
.timesheet-kind-other { background: #f3ecf9; color: #5b3a7a; }

@media (max-width: 700px) {
    .timesheet-summary {
        grid-template-columns: 1fr;
    }
}

/* The tabs are links. */
a.status-filter-button {
    text-decoration: none;
}

/* Under the customers' cards, with room above it. */
.billable-actions {
    margin-top: 1rem;
}

/* Ylläpito: erasing a company's data. */
.danger-zone {
  border-color: #f0c2c2;
}

.btn-danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.btn-danger:hover {
  background: #912018;
  border-color: #912018;
}
