:root {
    --sync-bg: #fcf8fa;
    --sync-panel: #ffffff;
    --sync-soft: #f1f4f8;
    --sync-soft-2: #e6edf8;
    --sync-line: #c6c6cd;
    --sync-line-strong: #aeb4bf;
    --sync-text: #1b1b1d;
    --sync-muted: #555e6d;
    --sync-primary: #0f172a;
    --sync-blue: #315d91;
    --sync-cyan: #007c89;
    --sync-warn: #8a5a00;
    --sync-danger: #9f1d1d;
    --sync-radius: 8px;
    --sync-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--sync-bg);
    color: var(--sync-text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

body.sync-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(252, 248, 250, 0.98)),
        var(--sync-bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.sync-shell {
    min-height: 100vh;
    display: flex;
    background: var(--sync-bg);
}

.sync-sidebar {
    width: 268px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    background: #f6f3f5;
    border-right: 1px solid var(--sync-line);
}

.sync-brand {
    padding: 0 10px 28px;
}

.sync-brand__name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
}

.sync-brand__sub {
    margin-top: 2px;
    color: var(--sync-muted);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sync-create {
    display: block;
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #000000;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.sync-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
}

.sync-nav__item {
    padding: 10px 12px;
    border-radius: 6px;
    color: #30343b;
    font-weight: 650;
}

.sync-nav__item:hover,
.sync-nav__item.is-active {
    background: #dbe8fb;
    color: #1f3d5e;
}

.sync-nav__item--bottom {
    margin-top: auto;
}

.sync-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sync-topbar {
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 420px) auto;
    gap: 22px;
    align-items: center;
    padding: 14px 32px;
    background: rgba(252, 248, 250, 0.96);
    border-top: 1px solid var(--sync-line);
    border-bottom: 1px solid var(--sync-line);
}

.sync-kicker,
.sync-eyebrow {
    color: var(--sync-blue);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sync-topbar h1 {
    margin: 2px 0 0;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 0;
}

.sync-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-search label {
    color: var(--sync-muted);
    font-weight: 700;
}

.sync-search input {
    width: 100%;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid var(--sync-line-strong);
    border-radius: 6px;
    background: #ffffff;
    color: var(--sync-text);
}

.sync-search input:focus {
    border-color: var(--sync-cyan);
    box-shadow: 0 0 0 3px rgba(0, 124, 137, 0.12);
    outline: none;
}

.sync-top-actions {
    display: flex;
    gap: 8px;
}

.sync-top-actions a {
    padding: 8px 10px;
    border: 1px solid var(--sync-line);
    border-radius: 6px;
    background: #ffffff;
    font-weight: 700;
}

.sync-content {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 32px 34px;
}

.sync-hero {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 470px);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 24px;
}

.sync-hero h2 {
    max-width: 760px;
    margin: 6px 0 8px;
    font-size: 34px;
    line-height: 1.14;
    letter-spacing: 0;
}

.sync-hero__text {
    max-width: 760px;
    margin: 0;
    color: var(--sync-muted);
    font-size: 16px;
}

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

.sync-snapshot div {
    padding: 14px;
    border: 1px solid var(--sync-line);
    border-radius: var(--sync-radius);
    background: var(--sync-panel);
}

.sync-snapshot strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.sync-snapshot span {
    display: block;
    margin-top: 6px;
    color: var(--sync-muted);
    font-size: 12px;
    font-weight: 700;
}

.sync-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.sync-grid--top {
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.8fr);
}

.sync-card {
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid var(--sync-line);
    border-radius: var(--sync-radius);
    background: var(--sync-panel);
    box-shadow: var(--sync-shadow);
}

.sync-card--wide {
    min-height: 340px;
}

.sync-card--ai {
    border-color: #b8cce8;
    background: #fbfdff;
}

.sync-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--sync-line);
}

.sync-card__head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
}

.sync-card__head a {
    color: var(--sync-blue);
    font-size: 12px;
    font-weight: 800;
}

.sync-project-list,
.sync-list,
.sync-chat-list,
.sync-action-stack {
    display: grid;
    gap: 10px;
}

.sync-project {
    padding: 13px;
    border: 1px solid #d7dce4;
    border-radius: 6px;
    background: #fbfbfc;
}

.sync-project__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.sync-project h4,
.sync-list strong,
.sync-chat-list strong {
    margin: 0;
    font-size: 14px;
}

.sync-project p,
.sync-muted {
    margin: 4px 0 0;
    color: var(--sync-muted);
}

.sync-chip {
    align-self: flex-start;
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--sync-soft);
    color: #26313f;
    font-size: 11px;
    font-weight: 800;
}

.sync-chip--active {
    background: #dff2e7;
    color: #116236;
}

.sync-chip--blocked {
    background: #fde4e4;
    color: var(--sync-danger);
}

.sync-chip--planning {
    background: #fcecc9;
    color: var(--sync-warn);
}

.sync-progress {
    height: 7px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e8ed;
}

.sync-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #007c89;
}

.sync-agenda {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sync-agenda li {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
}

.sync-agenda time {
    color: var(--sync-primary);
    font-weight: 800;
}

.sync-agenda div {
    padding-left: 13px;
    border-left: 3px solid var(--sync-blue);
}

.sync-agenda span,
.sync-list small,
.sync-chat-list small {
    display: block;
    color: var(--sync-muted);
    font-size: 12px;
}

.sync-list a,
.sync-chat-list a,
.sync-action-stack a {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fbfbfc;
}

.sync-list a:hover,
.sync-chat-list a:hover,
.sync-action-stack a:hover {
    border-color: #9fb5d3;
    background: #f4f8fd;
}

.sync-list em {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--sync-soft-2);
    color: #26415e;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.sync-chat-list a {
    justify-content: flex-start;
}

.sync-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #13213a;
    color: #ffffff;
    font-weight: 800;
}

.sync-chat-list a > span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.sync-chat-list b {
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--sync-danger);
    color: #ffffff;
    font-size: 12px;
}

.sync-action-stack a {
    justify-content: flex-start;
    font-weight: 750;
}

.sync-footerbar {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 32px;
    border-top: 1px solid var(--sync-line);
    border-bottom: 1px solid var(--sync-line);
    background: #f6f3f5;
    color: var(--sync-muted);
    font-size: 12px;
}

.sync-footerbar span:first-child {
    color: var(--sync-primary);
    font-weight: 800;
}

.sync-auth__panel {
    width: min(100%, 430px);
    padding: 28px;
    border: 1px solid var(--sync-line);
    border-radius: var(--sync-radius);
    background: var(--sync-panel);
    box-shadow: var(--sync-shadow);
}

.sync-auth__panel--wide {
    width: min(100%, 560px);
}

.sync-auth__brand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sync-line);
}

.sync-auth__brand strong {
    font-size: 22px;
    line-height: 1;
}

.sync-auth__brand span {
    color: var(--sync-muted);
    font-size: 12px;
    font-weight: 700;
}

.sync-auth h1 {
    margin: 6px 0 8px;
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: 0;
}

.sync-alert {
    margin: 18px 0;
    padding: 11px 13px;
    border-radius: 6px;
    font-weight: 700;
}

.sync-alert--error {
    border: 1px solid #f0b8b8;
    background: #fff0f0;
    color: var(--sync-danger);
}

.sync-alert--success {
    border: 1px solid #afd9bd;
    background: #effaf3;
    color: #14643a;
}

.sync-form {
    display: grid;
    gap: 9px;
    margin-top: 20px;
}

.sync-form label {
    color: var(--sync-primary);
    font-size: 13px;
    font-weight: 800;
}

.sync-form input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--sync-line-strong);
    border-radius: 6px;
    background: #ffffff;
    color: var(--sync-text);
    font: inherit;
}

.sync-form input:disabled {
    background: var(--sync-soft);
    color: var(--sync-muted);
}

.sync-form input:focus {
    border-color: var(--sync-cyan);
    box-shadow: 0 0 0 3px rgba(0, 124, 137, 0.12);
    outline: none;
}

.sync-profile-image-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--sync-line);
    border-radius: 8px;
    background: #f8fafc;
}

.sync-profile-image-preview img {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 8px;
    object-fit: cover;
    background: #ffffff;
}

.sync-profile-image-preview span {
    color: var(--sync-primary);
    font-weight: 800;
}

.sync-profile-avatar-field {
    display: grid;
    gap: 8px;
    margin: 4px 0;
    padding: 0;
    border: 0;
}

.sync-profile-avatar-field legend {
    color: var(--sync-primary);
    font-size: 13px;
    font-weight: 800;
}

.sync-profile-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.sync-profile-avatar-option {
    min-width: 0;
    display: grid;
    gap: 4px;
    justify-items: center;
    padding: 6px;
    border: 1px solid var(--sync-line);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
}

.sync-profile-avatar-option:has(input:checked) {
    border-color: var(--sync-blue);
    box-shadow: 0 0 0 3px rgba(49, 93, 145, 0.14);
}

.sync-profile-avatar-option input {
    width: 14px;
    min-height: 14px;
    padding: 0;
}

.sync-profile-avatar-option img {
    width: 42px;
    height: 42px;
    border-radius: 7px;
}

.sync-profile-avatar-option span {
    color: var(--sync-muted);
    font-size: 12px;
    font-weight: 800;
}

.sync-form button {
    min-height: 44px;
    margin-top: 10px;
    border: 0;
    border-radius: 6px;
    background: #000000;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.sync-form button:hover {
    background: #172033;
}

.sync-auth__links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--sync-line);
}

.sync-auth__links a {
    color: var(--sync-blue);
    font-weight: 800;
}

.sync-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.sync-page-head h2 {
    margin: 6px 0 8px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: 0;
}

.sync-page-head__action {
    flex: 0 0 auto;
    padding: 11px 14px;
    border-radius: 6px;
    background: #000000;
    color: #ffffff;
    font-weight: 800;
}

.sync-snapshot--inline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.sync-empty {
    display: grid;
    gap: 4px;
    padding: 24px;
    border: 1px dashed var(--sync-line-strong);
    border-radius: 6px;
    background: #fbfbfc;
    color: var(--sync-muted);
}

.sync-empty strong {
    color: var(--sync-primary);
}

.sync-project-table {
    display: grid;
    gap: 8px;
}

.sync-project-table__head,
.sync-project-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) 94px 110px minmax(260px, 1.2fr);
    gap: 14px;
    align-items: start;
}

.sync-project-table__head {
    padding: 0 10px 8px;
    color: var(--sync-muted);
    font-size: 12px;
    font-weight: 800;
}

.sync-project-row {
    padding: 12px 10px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fbfbfc;
}

.sync-project-row h4,
.sync-project-row p {
    margin: 0;
}

.sync-project-row h4 {
    font-size: 14px;
}

.sync-project-row p {
    color: var(--sync-muted);
}

.sync-project-row time {
    color: var(--sync-primary);
    font-weight: 800;
}

.sync-chip--planned {
    background: #fcecc9;
    color: var(--sync-warn);
}

.sync-chip--paused {
    background: #e8eaf1;
    color: #4a5568;
}

.sync-chip--completed {
    background: #dff2e7;
    color: #116236;
}

.sync-project-form {
    display: grid;
    gap: 18px;
}

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

.sync-form-grid label,
.sync-textarea {
    display: grid;
    gap: 7px;
}

.sync-form-grid label.sync-checkline {
    align-content: start;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    row-gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--sync-line-strong);
    border-radius: 6px;
    background: #ffffff;
}

.sync-checkline input {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 2px 0 0;
    padding: 0;
}

.sync-checkline small {
    grid-column: 2;
    color: var(--sync-muted);
    font-size: 12px;
}

.sync-form-grid span,
.sync-textarea span {
    color: var(--sync-primary);
    font-size: 13px;
    font-weight: 800;
}

.sync-form-grid input,
.sync-form-grid select,
.sync-textarea textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--sync-line-strong);
    border-radius: 6px;
    background: #ffffff;
    color: var(--sync-text);
    font: inherit;
}

.sync-textarea {
    margin-top: 14px;
}

.sync-textarea textarea {
    min-height: 112px;
    resize: vertical;
}

.sync-form-grid input:focus,
.sync-form-grid select:focus,
.sync-textarea textarea:focus {
    border-color: var(--sync-cyan);
    box-shadow: 0 0 0 3px rgba(0, 124, 137, 0.12);
    outline: none;
}

.sync-form-grid__wide {
    grid-column: 1 / -1;
}

.sync-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.sync-form-actions a,
.sync-form-actions button {
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 6px;
    font: inherit;
    font-weight: 800;
}

.sync-form-actions a {
    border: 1px solid var(--sync-line);
    background: #ffffff;
    color: var(--sync-primary);
}

.sync-form-actions button {
    border: 0;
    background: #000000;
    color: #ffffff;
    cursor: pointer;
}

.sync-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.sync-filter-tabs a {
    padding: 8px 12px;
    border: 1px solid var(--sync-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--sync-muted);
    font-weight: 800;
}

.sync-filter-tabs a.is-active,
.sync-filter-tabs a:hover {
    border-color: #9fb5d3;
    background: #dbe8fb;
    color: #1f3d5e;
}

.sync-knowledge-list {
    display: grid;
    gap: 10px;
}

.sync-knowledge-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fbfbfc;
}

.sync-knowledge-item h4,
.sync-knowledge-item p {
    margin: 0;
}

.sync-knowledge-item h4 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 15px;
}

.sync-title-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: #dbe8fb;
    color: #1f3d5e;
    font-size: 11px;
    font-weight: 800;
}

.sync-knowledge-item p {
    margin-top: 4px;
    color: var(--sync-muted);
}

.sync-knowledge-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.sync-knowledge-meta span {
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--sync-soft);
    color: var(--sync-muted);
    font-size: 11px;
    font-weight: 800;
}

.sync-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.sync-row-action {
    padding: 8px 10px;
    border: 1px solid var(--sync-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--sync-blue);
    font-weight: 800;
}

.sync-danger-zone {
    margin-top: 18px;
    border-color: #f0b8b8;
    background: #fffafa;
}

.sync-danger-zone form {
    margin-top: 14px;
}

.sync-danger-zone button {
    min-height: 40px;
    padding: 9px 13px;
    border: 0;
    border-radius: 6px;
    background: var(--sync-danger);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.sync-markdown-preview {
    min-height: 320px;
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fbfbfc;
    color: var(--sync-primary);
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.sync-markdown-html {
    max-width: 880px;
    color: var(--sync-primary);
    font-size: 15px;
    line-height: 1.75;
}

.sync-markdown-html h1,
.sync-markdown-html h2,
.sync-markdown-html h3 {
    margin: 24px 0 10px;
    line-height: 1.25;
    letter-spacing: 0;
}

.sync-markdown-html h1:first-child,
.sync-markdown-html h2:first-child,
.sync-markdown-html h3:first-child,
.sync-markdown-html p:first-child {
    margin-top: 0;
}

.sync-markdown-html p,
.sync-markdown-html ul,
.sync-markdown-html ol,
.sync-markdown-html blockquote,
.sync-markdown-html pre {
    margin: 0 0 16px;
}

.sync-markdown-html ul,
.sync-markdown-html ol {
    padding-left: 24px;
}

.sync-markdown-html blockquote {
    padding: 10px 14px;
    border-left: 4px solid var(--sync-blue);
    background: #f4f8fd;
    color: var(--sync-muted);
}

.sync-markdown-html code {
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--sync-soft);
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 0.92em;
}

.sync-markdown-html pre {
    padding: 16px;
    overflow-x: auto;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fbfbfc;
}

.sync-markdown-html pre code {
    padding: 0;
    background: transparent;
    white-space: pre;
}

.sync-markdown-html a {
    color: var(--sync-blue);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sync-quick-capture {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.sync-quick-capture textarea {
    width: 100%;
    min-height: 78px;
    padding: 10px 12px;
    border: 1px solid var(--sync-line-strong);
    border-radius: 6px;
    background: #ffffff;
    color: var(--sync-text);
    font: inherit;
    resize: vertical;
}

.sync-quick-capture button {
    min-width: 86px;
    border: 0;
    border-radius: 6px;
    background: #000000;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.sync-brainstorm-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.sync-idea-card {
    min-height: 210px;
    padding: 16px;
    border: 1px solid var(--sync-line);
    border-radius: var(--sync-radius);
    background: var(--sync-panel);
    box-shadow: var(--sync-shadow);
}

.sync-idea-card__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.sync-idea-card__head span,
.sync-idea-card__head em {
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.sync-idea-card__head span {
    background: #dbe8fb;
    color: #1f3d5e;
}

.sync-idea-card__head em {
    background: var(--sync-soft);
    color: var(--sync-muted);
}

.sync-idea-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.sync-idea-card p {
    margin: 0;
    color: var(--sync-muted);
}

.sync-schedule-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.sync-calendar-stack {
    display: grid;
    gap: 18px;
}

.sync-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.sync-calendar-grid--head {
    margin-bottom: 8px;
    color: var(--sync-muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.sync-calendar-day {
    min-height: 104px;
    padding: 8px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fbfbfc;
}

.sync-calendar-day--sunday {
    background: #fff5f5;
}

.sync-calendar-day--saturday {
    background: #f3f8ff;
}

.sync-calendar-day.is-today {
    border-color: var(--sync-cyan);
    box-shadow: 0 0 0 2px rgba(0, 124, 137, 0.12);
}

.sync-calendar-day__top {
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.sync-calendar-day strong {
    font-size: 12px;
}

.sync-calendar-note-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--sync-cyan);
    box-shadow: 0 0 0 2px rgba(0, 124, 137, 0.12);
}

.sync-calendar-item {
    display: grid;
    gap: 2px;
    margin-top: 5px;
    padding: 5px;
    border-radius: 5px;
    background: #dbe8fb;
    color: #1f3d5e;
    font-size: 11px;
    font-weight: 800;
}

.sync-calendar-item span {
    color: var(--sync-muted);
    font-size: 10px;
}

.sync-context-panel {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 96px;
}

.sync-context-row {
    display: grid;
    gap: 3px;
    padding: 10px 0;
    border-bottom: 1px solid var(--sync-line);
}

.sync-context-row:last-child {
    border-bottom: 0;
}

.sync-context-row span {
    color: var(--sync-muted);
    font-size: 12px;
}

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

.sync-meeting-item {
    display: grid;
    gap: 10px;
    min-height: 170px;
    padding: 16px;
    border: 1px solid var(--sync-line);
    border-radius: var(--sync-radius);
    background: var(--sync-panel);
    box-shadow: var(--sync-shadow);
}

.sync-meeting-item:hover {
    border-color: #9fb5d3;
    background: #fbfdff;
}

.sync-chat-list-card {
    display: flex;
    gap: 12px;
    min-width: 0;
}

.sync-chat-list-card__body {
    min-width: 0;
    display: grid;
    flex: 1;
    gap: 10px;
}

.sync-chat-list-card__message {
    color: var(--sync-muted);
}

.sync-chat-list-thumb {
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
    overflow: hidden;
    border: 1px solid var(--sync-line);
    border-radius: 6px;
    background: var(--sync-soft);
}

.sync-chat-list-thumb__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.sync-meeting-item__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sync-meeting-item__head strong {
    font-size: 16px;
    line-height: 1.3;
}

.sync-meeting-item__head span {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #dbe8fb;
    color: #1f3d5e;
    font-size: 11px;
    font-weight: 800;
}

.sync-meeting-item p {
    margin: 0;
    color: var(--sync-muted);
}

.sync-meeting-item small {
    align-self: end;
    color: var(--sync-muted);
    font-size: 12px;
}

.sync-readonly-note {
    display: grid;
    gap: 4px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--sync-line-strong);
    border-radius: 6px;
    background: #f4f8fd;
}

.sync-readonly-note strong {
    color: var(--sync-primary);
    font-size: 13px;
}

.sync-readonly-note span {
    color: var(--sync-muted);
    font-size: 12px;
    font-weight: 700;
}

.sync-chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.sync-chat-panel {
    display: grid;
    gap: 12px;
}

.sync-chat-message {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 14px;
    align-items: start;
    padding: 13px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fbfbfc;
}

.sync-chat-message__main {
    min-width: 0;
}

.sync-chat-message__author {
    color: var(--sync-primary);
    font-size: 13px;
    line-height: 1.2;
}

.sync-chat-message__side time {
    color: var(--sync-muted);
    font-size: 12px;
}

.sync-chat-message__side {
    display: grid;
    justify-items: end;
    gap: 5px;
    text-align: right;
}

.sync-chat-message__body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.sync-chat-message__content {
    min-width: 0;
}

.sync-chat-message__content p {
    margin: 0;
    color: var(--sync-text);
    white-space: normal;
}

.sync-chat-attachments {
    display: grid;
    gap: 8px;
    max-width: 180px;
}

.sync-chat-attachment {
    display: grid;
    gap: 8px;
    align-items: center;
    max-width: 100%;
    padding: 8px;
    border: 1px solid var(--sync-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--sync-blue);
    font-weight: 800;
}

.sync-chat-attachment__image {
    width: 150px;
    max-height: 110px;
    object-fit: cover;
    border-radius: 5px;
    background: var(--sync-soft);
}

.sync-chat-attachment__pdf {
    width: 44px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: #fde4e4;
    color: var(--sync-danger);
    font-size: 12px;
    font-weight: 900;
}

.sync-chat-attachment span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sync-chat-message__actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.sync-chat-action,
.sync-chat-message__actions button {
    width: 26px;
    height: 26px;
    min-height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--sync-line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--sync-blue);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.sync-chat-action__icon {
    line-height: 1;
    font-size: 14px;
}

.sync-chat-action--danger {
    border-color: #efb7b7;
    color: var(--sync-danger);
}

.sync-chat-compose {
    position: sticky;
    top: 96px;
}

.sync-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.35);
}

.sync-chat-modal.is-open {
    display: grid;
}

.sync-chat-modal__panel {
    width: min(100%, 560px);
    padding: 18px 20px;
    border: 1px solid var(--sync-line);
    border-radius: var(--sync-radius);
    background: var(--sync-panel);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.sync-chat-modal__panel form {
    margin: 0;
}

.sync-danger-button {
    border: 0 !important;
    background: var(--sync-danger) !important;
    color: #ffffff !important;
}

@media (max-width: 1100px) {
    .sync-grid,
    .sync-grid--top,
    .sync-hero {
        grid-template-columns: 1fr 1fr;
    }

    .sync-card--wide {
        min-height: auto;
    }
}

@media (max-width: 860px) {
    .sync-shell {
        display: block;
    }

    .sync-sidebar {
        width: 100%;
        min-height: 0;
        position: static;
        border-right: 0;
        border-bottom: 1px solid var(--sync-line);
    }

    .sync-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sync-nav__item--bottom {
        margin-top: 0;
    }

    .sync-topbar {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .sync-content {
        padding: 22px 16px;
    }

    .sync-grid,
    .sync-grid--top,
    .sync-hero,
    .sync-page-head,
    .sync-snapshot {
        grid-template-columns: 1fr;
    }

    .sync-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .sync-snapshot--inline,
    .sync-form-grid,
    .sync-project-table__head,
    .sync-project-row,
    .sync-knowledge-item,
    .sync-brainstorm-board,
    .sync-quick-capture,
    .sync-schedule-layout,
    .sync-meeting-grid,
    .sync-chat-layout {
        grid-template-columns: 1fr;
    }

    .sync-context-panel {
        position: static;
    }

    .sync-chat-compose {
        position: static;
    }

    .sync-chat-message__body {
        grid-template-columns: 1fr;
    }

    .sync-chat-message {
        grid-template-columns: 1fr;
    }

    .sync-chat-message__side {
        justify-items: start;
        text-align: left;
    }

    .sync-chat-attachments {
        max-width: 100%;
    }

    .sync-calendar-grid {
        gap: 4px;
    }

    .sync-calendar-day {
        min-height: 86px;
        padding: 6px;
    }

    .sync-project-table__head {
        display: none;
    }

    .sync-hero h2 {
        font-size: 26px;
    }

    .sync-footerbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 16px;
    }
}
