:root {
    --bg: #050508;
    --text: #d4d4d8;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --heading: #ffffff;
    --border: #27272a;
    --border-hover: #52525b;
    --card: rgba(9, 9, 11, 0.4);
    --focus: rgba(200, 205, 230, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    color: #f4f4f5;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.brand {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.site-nav {
    display: flex;
    gap: 1.25rem;
    font-size: 0.9rem;
}

.site-nav a:hover {
    text-shadow: 0 0 24px rgba(200, 205, 230, 0.12);
}

.site-main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem;
}

.page-title {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--heading);
    margin: 0 0 1rem;
}

.section-title {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--heading);
    margin: 0 0 0.75rem;
}

.page-actions {
    margin-bottom: 1.5rem;
}

.project-section {
    margin-bottom: 2rem;
}

.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1rem 1.25rem;
    background: var(--card);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 24px rgba(200, 205, 230, 0.08);
}

.project-card-archived {
    opacity: 0.75;
}

.project-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.project-name {
    font-weight: 600;
    color: var(--heading);
}

.project-client {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.project-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.muted {
    color: var(--text-dim);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #52525b;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn:hover {
    border-color: #a1a1aa;
    color: #f4f4f5;
    box-shadow: 0 0 24px rgba(200, 205, 230, 0.12);
}

.btn:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.btn-primary {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
}

.input,
select.input {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    background: rgba(24, 24, 27, 0.8);
    border: 1px solid var(--border);
    border-radius: 0;
}

.input:focus-visible,
select.input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 0;
    border-color: var(--border-hover);
}

.textarea {
    min-height: 6rem;
    resize: vertical;
}

.select-compact {
    width: auto;
    min-width: 11rem;
    max-width: 100%;
}

.field {
    margin-bottom: 1rem;
}

.field-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label {
    margin: 0;
    font-size: 0.9rem;
}

.form-stack {
    max-width: 40rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.login-wrap {
    max-width: 22rem;
    margin: 4rem auto;
    padding: 0 1rem;
}

.login-title {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--heading);
    margin: 0 0 0.25rem;
}

.login-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-error {
    color: #fca5a5;
    font-size: 0.875rem;
    margin: 0;
}

.login-error code {
    font-size: 0.8rem;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.breadcrumb .sep {
    margin: 0 0.35rem;
    color: var(--text-dim);
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: start;
}

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

.board-column {
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--card);
    padding: 1rem;
    min-height: 8rem;
}

.board-column-title {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--heading);
    margin: 0 0 1rem;
    text-transform: none;
}

.board-add {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.board-empty {
    color: var(--text-dim);
    font-size: 0.875rem;
    margin: 0.5rem 0 0;
}

.task-card {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: rgba(9, 9, 11, 0.5);
}

.task-desc {
    margin: 0 0 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
}

.task-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.validation-message {
    color: #fca5a5;
    font-size: 0.8125rem;
}

#blazor-error-ui {
    background: #18181b;
    color: var(--text);
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 1px solid var(--border);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
}

/* Памятки */
.memo-page-lead {
    margin: 0 0 1.5rem;
    max-width: 40rem;
}

.memo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.memo-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.25rem;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.memo-tile:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 24px rgba(200, 205, 230, 0.1);
}

.memo-tile:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.memo-tile-title {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 1rem;
    color: var(--heading);
}

.memo-tile-teaser {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.memo-tile-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

.memo-modal-root {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.memo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    cursor: pointer;
}

.memo-modal {
    position: relative;
    z-index: 1;
    width: min(42rem, 100%);
    max-height: min(88vh, 100%);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: var(--bg);
    box-shadow: 0 0 48px rgba(0, 0, 0, 0.5);
}

.memo-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.memo-modal-title {
    margin: 0;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--heading);
}

.memo-modal-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 0;
}

.memo-modal-close:hover {
    border-color: var(--border-hover);
    color: var(--heading);
}

.memo-modal-close:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.memo-modal-body {
    overflow-y: auto;
    padding: 1rem 1.25rem 1.5rem;
}

.memo-block {
    margin-bottom: 1.5rem;
}

.memo-block:last-child {
    margin-bottom: 0;
}

.memo-block-heading {
    margin: 0 0 0.5rem;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--heading);
}

.memo-block-intro {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.memo-block-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.55;
}

.memo-block-list li {
    margin-bottom: 0.35rem;
}
