:root {
    color-scheme: light;
    --primary: #2f54eb;
    --accent: #fadb14;
    --bg: #f7f8fa;
    --text: #1f1f1f;
    --border: #d9d9d9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header, .site-footer {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.site-footer {
    border-top: 1px solid var(--border);
    border-bottom: none;
    text-align: center;
}

.logo {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--text);
}

.site-main {
    padding: 2rem 0 3rem;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

form input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    background: rgba(47, 84, 235, 0.1);
    border: 1px solid rgba(47, 84, 235, 0.2);
}

.auth-switch {
    margin-top: 1rem;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

table th {
    background: rgba(47, 84, 235, 0.05);
    font-weight: 600;
}

table tr:last-child td {
    border-bottom: none;
}

.doc-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.form-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.form-section h2 {
    margin-top: 0;
}

.doc-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.doc-content pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

.doc-meta {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.doc-comments,
.doc-tasks {
    margin-top: 2rem;
}

.comment-form textarea,
.task-form input,
.task-form select,
.task-form textarea {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 1rem;
}

.comment-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.comment-item.comment--resolved {
    border-left-color: var(--accent);
    opacity: 0.85;
}

.comment-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #555;
}

.comment-meta .status {
    font-weight: 600;
    color: var(--primary);
}

.resolved-info {
    font-size: 0.85rem;
    color: #667085;
}

.comment-actions {
    margin-top: 0.5rem;
}

.task-form__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.cluster-list {
    display: grid;
    gap: 1.5rem;
}

.cluster-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.cluster-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cluster-card__actions {
    display: inline-flex;
    gap: 0.25rem;
}

.cluster-update-form {
    margin-bottom: 1.5rem;
}

.cluster-docs table {
    margin-bottom: 1rem;
}

.cluster-add-doc form {
    margin-top: 0.5rem;
}

.inline-form {
    display: inline;
    margin-right: 0.25rem;
}

.text-danger {
    color: #f5222d;
}
