h1:focus {
    outline: none;
}

a,
.btn-link {
    color: #0f766e;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
        linear-gradient(180deg, #f7f8fc 0%, #eef3f8 100%);
    color: #1f2933;
}

.shell {
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(17, 24, 39, 0.94);
    color: #f9fafb;
}

.brand-block h1 {
    margin: 0;
    font-size: 1.65rem;
}

.topbar-nav {
    display: flex;
    gap: 1rem;
}

.topbar a {
    color: #ccfbf1;
    text-decoration: none;
}

.topbar-nav .active {
    color: #ffffff;
    font-weight: 700;
}

.brand-kicker,
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    margin: 0 0 0.35rem;
    color: #99f6e4;
}

.content {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 4.25rem);
    line-height: 1;
}

.hero-dashboard {
    align-items: stretch;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lede {
    max-width: 56rem;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.hero-card,
.panel {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    padding: 1.25rem 1.35rem;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1.5rem;
}

.metric-card {
    border-radius: 16px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.metric-label {
    display: block;
    font-size: 0.82rem;
    color: #52606d;
    margin-bottom: 0.35rem;
}

.metric-card strong {
    font-size: 1.8rem;
}

.session-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
}

.section-kicker {
    margin: 0 0 0.3rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #0f766e;
}

.session-list,
.task-meta,
.detail-grid,
.history-meta {
    margin: 0;
}

.session-list div,
.task-meta div,
.detail-grid div,
.history-meta div {
    display: grid;
    gap: 0.2rem;
    margin-bottom: 0.8rem;
}

.session-list dt,
.task-meta dt,
.detail-grid dt,
.history-meta dt {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #52606d;
}

.session-list dd,
.task-meta dd,
.detail-grid dd,
.history-meta dd {
    margin: 0;
}

.session-value {
    word-break: break-word;
}

.banner {
    border-radius: 16px;
    padding: 1rem 1.1rem;
    margin: 1.5rem 0 0;
    border: 1px solid transparent;
}

.banner-error {
    background: rgba(254, 226, 226, 0.88);
    color: #991b1b;
    border-color: rgba(248, 113, 113, 0.35);
}

.banner-success {
    background: rgba(220, 252, 231, 0.88);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.3);
}

.banner-warning {
    background: rgba(254, 243, 199, 0.88);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.3);
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.95fr 1.2fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: start;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: start;
}

.composer-panel,
.list-panel,
.detail-panel {
    min-height: 34rem;
}

.task-form,
.field,
.comment-composer {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.field {
    margin-bottom: 1rem;
}

.field span {
    font-weight: 600;
    color: #243b53;
}

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

.checkbox-field {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    margin-bottom: 1rem;
}

.checkbox-field input {
    margin-top: 0.25rem;
    width: 1rem;
    height: 1rem;
}

.checkbox-field strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #102a43;
}

.checkbox-field span {
    font-weight: 400;
    color: #52606d;
}

.text-input,
.text-area {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 0.85rem 0.95rem;
    font: inherit;
    background: #ffffff;
    color: #102a43;
}

.text-area {
    min-height: 7rem;
    resize: vertical;
}

.text-input:focus,
.text-area:focus {
    outline: 2px solid rgba(15, 118, 110, 0.2);
    border-color: #0f766e;
}

.primary-button,
.success-button,
.danger-button,
.ghost-button,
.chip-button,
.filter-chip {
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1.1rem;
    font: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.primary-button,
.success-button,
.danger-button,
.ghost-button {
    font-weight: 700;
}

.primary-button {
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #ffffff;
    box-shadow: 0 14px 24px rgba(15, 118, 110, 0.22);
}

.success-button {
    background: linear-gradient(135deg, #15803d, #166534);
    color: #ffffff;
}

.danger-button {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
}

.ghost-button,
.chip-button,
.filter-chip {
    background: rgba(15, 23, 42, 0.06);
    color: #102a43;
}

.chip-button {
    padding: 0.45rem 0.8rem;
}

.primary-button:disabled,
.success-button:disabled,
.danger-button:disabled,
.ghost-button:disabled {
    opacity: 0.65;
    cursor: default;
    box-shadow: none;
}

.selected-assignee,
.attachment-draft,
.attachment-item,
.task-card-top,
.detail-status-row,
.action-bar,
.filter-row,
.section-heading,
.comment-head,
.history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.selected-assignee {
    margin-top: 0.25rem;
    padding: 0.75rem 0.9rem;
    background: rgba(236, 253, 245, 0.88);
    border: 1px solid rgba(15, 118, 110, 0.15);
    border-radius: 12px;
}

.search-results {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.search-result {
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.search-result strong {
    font-size: 0.98rem;
}

.search-result span,
.helper-text,
.muted,
.attachment-item p,
.task-card-copy {
    color: #52606d;
}

.attachment-draft-list,
.attachment-list,
.comment-list,
.history-list {
    display: grid;
    gap: 0.75rem;
}

.filter-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 1rem 0 1.2rem;
}

.filter-chip {
    padding: 0.55rem 0.95rem;
}

.filter-chip.is-active {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.task-list {
    display: grid;
    gap: 0.85rem;
}

.task-card,
.comment-card,
.history-card,
.inline-panel {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.96);
    padding: 1rem;
}

.task-card {
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.task-card.is-selected {
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.12);
}

.task-card h3,
.comment-card p,
.history-card p {
    margin: 0;
}

.task-card-copy {
    margin: 0;
    line-height: 1.45;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.08);
    color: #102a43;
}

.pill-info {
    background: rgba(59, 130, 246, 0.13);
    color: #1d4ed8;
}

.pill-success {
    background: rgba(34, 197, 94, 0.14);
    color: #166534;
}

.pill-danger {
    background: rgba(239, 68, 68, 0.14);
    color: #991b1b;
}

.pill-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.pill-muted {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.detail-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-description {
    margin: 0;
    line-height: 1.65;
    color: #334e68;
}

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

.compact-grid {
    margin-top: 1rem;
}

.action-bar {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.subsection {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.comment-composer {
    gap: 0.75rem;
}

.comment-card,
.history-card {
    display: grid;
    gap: 0.65rem;
}

.attachment-item a {
    font-weight: 700;
    text-decoration: none;
}

.attachment-item p {
    margin: 0.2rem 0 0;
    font-size: 0.88rem;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #52606d;
}

.status-note {
    margin: 1rem 0 0;
    line-height: 1.5;
}

.empty-state h2,
.empty-state h3 {
    color: #102a43;
}

.detail-empty {
    margin: auto 0;
}

.panel ul,
.hero-card ul {
    padding-left: 1.2rem;
    margin: 0.75rem 0 0;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 820px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero,
    .workspace-grid,
    .settings-grid,
    .field-row,
    .detail-grid,
    .metric-strip {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 1.25rem;
    }

    .section-heading,
    .detail-status-row,
    .attachment-item,
    .task-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-nav {
        width: 100%;
        justify-content: space-between;
    }
}
