body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f4f7fb;
    color: #1d2736;
    overflow-x: hidden;
}

.guest-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, #e8f4ff, #f6f8fc 52%);
}

.login-shell {
    width: min(100%, 460px);
    padding: 24px;
}

.login-card {
    border-radius: 24px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 420px 1fr;
}

.manage-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.mobile-drawer-backdrop,
.mobile-topbar,
.mobile-detail-topbar,
.mobile-drawer-header,
.mobile-fab-wrap {
    display: none;
}

.desktop-only {
    display: block;
}

.sidebar-panel,
.list-panel,
.detail-panel {
    min-height: 100vh;
}

.sidebar-panel {
    background: linear-gradient(180deg, #193448, #102838);
    color: #d9e6ef;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.brand-block {
    padding: 10px 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
}

.brand-subtitle,
.eyebrow,
.nav-label,
.nav-empty,
.detail-meta {
    color: #7e8fa3;
}

.brand-user {
    margin-top: 10px;
    font-size: 13px;
    color: #9eb0c2;
}

.nav-group {
    display: grid;
    gap: 6px;
}

.nav-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 12px;
}

.nav-item {
    color: inherit;
    text-decoration: none;
    padding: 12px;
    border-radius: 14px;
    transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.list-panel {
    padding: 24px;
    border-right: 1px solid #e5ebf3;
    background: #edf3f8;
}

.detail-panel {
    padding: 24px 28px;
    background: #ffffff;
}

.manage-main {
    padding: 28px;
    background: #f4f7fb;
}

.mobile-icon-btn {
    border: 0;
    background: transparent;
    color: inherit;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.panel-header,
.detail-header,
.detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.panel-title {
    margin: 2px 0 0;
    font-size: 28px;
    font-weight: 700;
}

.manage-page {
    display: grid;
    gap: 20px;
}

.manage-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
}

.manage-title {
    margin: 2px 0 6px;
    font-size: 30px;
    font-weight: 700;
}

.manage-subtitle {
    color: #6e7f92;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select {
    width: 220px;
    border-radius: 14px;
}

.manage-card {
    background: #fff;
    border: 1px solid #e2eaf3;
    border-radius: 22px;
    padding: 8px 0;
    box-shadow: 0 10px 28px rgba(16, 40, 56, 0.04);
}

.share-inline-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 88px auto;
    gap: 8px;
    align-items: center;
}

.share-inline-card {
    margin-top: 18px;
    border: 1px solid #e2eaf3;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff, #f7fbff);
    padding: 18px;
    box-shadow: 0 10px 26px rgba(16, 40, 56, 0.04);
}

.share-inline-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 12px;
}

.share-inline-title {
    font-size: 18px;
    font-weight: 700;
    color: #16324a;
}

.share-inline-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #6d8197;
}

.share-inline-body {
    display: grid;
    gap: 14px;
}

.share-inline-form-wide {
    grid-template-columns: minmax(180px, 1fr) 120px 160px;
}

.share-inline-result {
    display: grid;
    gap: 10px;
}

.share-inline-link {
    word-break: break-all;
    background: #fff;
    border: 1px solid #dfe9f3;
    border-radius: 14px;
    padding: 12px 14px;
    color: #315069;
    font-size: 14px;
}

.share-inline-meta {
    color: #708399;
    font-size: 13px;
}

.share-link-line {
    margin-top: 6px;
    word-break: break-all;
}

.share-view-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top left, #eef6ff, #f7fbff 60%);
}

.share-view-card {
    width: min(100%, 920px);
    background: #fff;
    border: 1px solid #dfebf7;
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(16, 40, 56, 0.08);
}

.share-view-title {
    margin: 8px 0 10px;
    font-size: 34px;
    font-weight: 700;
}

.share-view-meta {
    color: #72859b;
    margin-bottom: 24px;
}

.share-content-text {
    white-space: pre-wrap;
    line-height: 1.85;
    color: #334155;
    font-size: 16px;
}

.share-todo-list {
    display: grid;
    gap: 12px;
}

.share-todo-row {
    display: grid;
    grid-template-columns: 32px 1fr 180px;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e2eaf3;
    border-radius: 18px;
    background: #fbfdff;
}

.share-todo-row.is-done {
    opacity: 0.78;
}

.share-todo-check {
    font-size: 18px;
    color: #1f8f7a;
}

.share-todo-content {
    color: #334155;
}

.share-todo-remind {
    color: #6f8398;
    font-size: 14px;
    text-align: right;
}

.manage-table {
    margin-bottom: 0;
}

.manage-table th,
.manage-table td {
    padding: 16px 18px;
    white-space: nowrap;
}

.manage-table thead th {
    color: #66798f;
    font-weight: 600;
    border-bottom-width: 1px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending,
.status-sending {
    background: #eef6ff;
    color: #2267a7;
}

.status-sent,
.status-success {
    background: #ecfdf3;
    color: #1b7f52;
}

.status-failed {
    background: #fff1f2;
    color: #c63d4e;
}

.status-cancelled {
    background: #f3f4f6;
    color: #667085;
}

.error-cell {
    max-width: 340px;
    white-space: normal;
    color: #607286;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.search-box {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #dde7f2;
    border-radius: 18px;
    padding: 12px 14px;
}

.search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    background: transparent;
}

.note-list {
    display: grid;
    gap: 16px;
}

.note-card,
.empty-card {
    display: block;
    background: #fff;
    border: 1px solid #e2eaf3;
    border-radius: 22px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 28px rgba(16, 40, 56, 0.04);
}

.note-card.is-active {
    border-color: #7ac0e7;
    box-shadow: 0 14px 36px rgba(63, 168, 224, 0.12);
}

.note-card-top,
.note-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #7d8c9f;
}

.note-card h3 {
    margin: 10px 0 8px;
    font-size: 24px;
}

.note-card p {
    margin: 0 0 12px;
    color: #5d6d80;
    line-height: 1.6;
}

.note-type {
    background: #ecf8ff;
    color: #1570a6;
    padding: 4px 10px;
    border-radius: 999px;
}

.detail-form,
.detail-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.detail-empty {
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
}

.detail-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 24px 0;
}

.detail-title,
.detail-content {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.detail-title {
    font-size: 34px;
    font-weight: 700;
}

.detail-tip {
    font-size: 13px;
    color: #61758c;
    background: #f5f9fd;
    border: 1px solid #e1ebf5;
    border-radius: 14px;
    padding: 12px 14px;
}

.detail-content {
    flex: 1;
    min-height: 420px;
    resize: vertical;
    font-size: 16px;
    line-height: 1.8;
    color: #445468;
}

.detail-footer-actions {
    display: flex;
    gap: 10px;
}

.todo-editor-shell {
    width: min(100%, 980px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.todo-list-editor {
    display: grid;
    gap: 14px;
}

.todo-board {
    background: linear-gradient(180deg, #fbfdff, #f6faff);
    border: 1px solid #dfebf7;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.04);
}

.todo-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.todo-board-title {
    font-size: 18px;
    font-weight: 700;
    color: #16324a;
}

.todo-board-summary {
    font-size: 13px;
    color: #6c8197;
}

.todo-row {
    display: grid;
    grid-template-columns: 32px minmax(280px, 1fr) 260px;
    gap: 16px;
    align-items: start;
    padding: 16px;
    border: 1px solid #dde8f4;
    border-radius: 20px;
    background: #ffffff;
    transition: 0.2s ease;
}

.todo-row:hover {
    border-color: #bfd8ef;
    box-shadow: 0 10px 24px rgba(38, 101, 148, 0.08);
}

.todo-row.is-done {
    background: #fbfcfe;
    border-style: dashed;
    opacity: 0.92;
}

.todo-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding-top: 12px;
}

.todo-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.todo-check-ui {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 2px solid #b8cade;
    background: #fff;
    position: relative;
    transition: 0.2s ease;
}

.todo-check input:checked + .todo-check-ui {
    background: #1f8f7a;
    border-color: #1f8f7a;
}

.todo-check input:checked + .todo-check-ui::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.todo-main {
    display: flex;
    align-items: center;
    min-height: 46px;
}

.todo-input {
    width: 100%;
    border: 1px solid transparent;
    outline: 0;
    background: #f7fafc;
    font-size: 16px;
    color: #334155;
    border-radius: 14px;
    padding: 12px 14px;
    transition: 0.2s ease;
}

.todo-input:focus {
    background: #fff;
    border-color: #8cc5e9;
    box-shadow: 0 0 0 4px rgba(64, 165, 226, 0.12);
}

.todo-input.is-completed {
    text-decoration: line-through;
    color: #94a3b8;
    background: #f8fafc;
}

.todo-remind-group {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 10px;
}

.todo-remind-field {
    display: grid;
    gap: 6px;
}

.todo-remind-field span {
    font-size: 12px;
    color: #71859b;
    padding-left: 2px;
}

.todo-done-block {
    margin-top: 18px;
    border-top: 1px solid #dde8f4;
    padding-top: 16px;
}

.todo-done-block summary {
    list-style: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #5b6f85;
    user-select: none;
}

.todo-done-block summary::-webkit-details-marker {
    display: none;
}

.todo-done-block summary::before {
    content: ">";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.todo-done-block[open] summary::before {
    transform: rotate(90deg);
}

.todo-done-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.todo-date-input,
.todo-time-input {
    width: 100%;
    border: 1px solid #d6e3ef;
    background: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    color: #334155;
    outline: 0;
    transition: 0.2s ease;
}

.todo-date-input:focus,
.todo-time-input:focus {
    border-color: #8cc5e9;
    box-shadow: 0 0 0 4px rgba(64, 165, 226, 0.12);
}

@media (max-width: 1400px) {
    .todo-row {
        grid-template-columns: 32px 1fr;
    }

    .todo-remind-group {
        grid-column: 2 / 3;
    }
}

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

    .share-inline-form-wide {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: 1fr;
        min-height: 100svh;
    }

    .manage-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-panel {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
        width: min(82vw, 320px);
        height: 100svh;
        min-height: 100svh;
        padding: 0 14px 18px;
        transform: translateX(-105%);
        transition: transform 0.28s ease;
        overflow-y: auto;
        box-shadow: 18px 0 42px rgba(6, 18, 28, 0.18);
    }

    .mobile-drawer-open .sidebar-panel {
        transform: translateX(0);
    }

    .mobile-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(13, 27, 42, 0.32);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .mobile-drawer-open .mobile-drawer-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-drawer-header {
        display: block;
        margin: 0 -14px 14px;
    }

    .mobile-drawer-hero {
        min-height: 180px;
        padding: 28px 22px 20px;
        background: linear-gradient(180deg, rgba(120, 216, 231, 0.95), rgba(153, 224, 234, 0.82));
        color: #ffffff;
        display: flex;
        flex-direction: column;
        justify-content: end;
    }

    .mobile-drawer-brand {
        font-size: 22px;
        font-weight: 700;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-drawer-user {
        margin-top: 6px;
        font-size: 14px;
        opacity: 0.96;
    }

    .brand-block {
        display: none;
    }

    .list-panel,
    .detail-panel {
        min-height: 100svh;
    }

    .list-panel {
        padding: 92px 16px 96px;
        border-right: 0;
        background: linear-gradient(180deg, #f8fbfd, #eef4f8);
    }

    .detail-panel {
        padding: 82px 16px 20px;
    }

    .manage-main {
        padding: 16px;
    }

    .mobile-topbar,
    .mobile-detail-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        z-index: 30;
        background: linear-gradient(180deg, #5ecbe3, #4db9d6);
        color: #fff;
        box-shadow: 0 8px 24px rgba(43, 136, 167, 0.18);
    }

    .mobile-topbar {
        top: 0;
        min-height: 82px;
        padding: 18px 14px 14px;
    }

    .mobile-detail-topbar {
        top: 0;
        min-height: 72px;
        padding: 14px 12px 10px;
    }

    .mobile-topbar-title {
        flex: 1;
        font-size: 26px;
        font-weight: 700;
        color: #fff;
    }

    .mobile-topbar-actions {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mobile-back-btn {
        color: #fff;
    }

    .mobile-detail-title {
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .desktop-panel-header,
    .desktop-search-box {
        display: none;
    }

    .mobile-note-list {
        gap: 18px;
    }

    .note-card {
        padding: 22px 20px;
        border-radius: 24px;
        box-shadow: 0 10px 28px rgba(16, 40, 56, 0.06);
    }

    .note-card h3 {
        font-size: 30px;
        line-height: 1.15;
        margin-bottom: 14px;
    }

    .note-card p {
        font-size: 17px;
        line-height: 1.65;
        margin-bottom: 14px;
    }

    .note-card-top,
    .note-meta {
        font-size: 14px;
    }

    .mobile-fab-wrap {
        display: block;
        position: fixed;
        right: 20px;
        bottom: 24px;
        z-index: 25;
    }

    .mobile-fab {
        width: 74px;
        height: 74px;
        border-radius: 50%;
        background: linear-gradient(180deg, #62d1ea, #45bdd8);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 34px;
        text-decoration: none;
        box-shadow: 0 14px 34px rgba(69, 189, 216, 0.34);
    }

    .mobile-view-list .detail-panel {
        display: none;
    }

    .mobile-view-detail .list-panel {
        display: none;
    }

    .panel-header,
    .detail-header,
    .detail-footer,
    .manage-header,
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions,
    .detail-footer-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn,
    .detail-footer-actions .btn,
    .panel-header .btn,
    .detail-header .btn,
    .filter-bar .btn,
    .filter-select {
        width: 100%;
    }

    .panel-title,
    .manage-title,
    .detail-title,
    .share-view-title {
        font-size: 28px;
    }

    .todo-editor-shell {
        width: 100%;
    }

    .todo-board {
        padding: 14px;
        border-radius: 20px;
    }

    .todo-board-head {
        flex-direction: column;
        align-items: start;
    }

    .todo-row,
    .share-todo-row {
        grid-template-columns: 1fr;
    }

    .todo-check {
        justify-content: flex-start;
        padding-top: 0;
    }

    .todo-main,
    .todo-remind-group {
        grid-column: auto;
    }

    .todo-remind-group {
        grid-template-columns: 1fr 1fr;
    }

    .manage-table th,
    .manage-table td {
        white-space: normal;
        padding: 12px 14px;
    }

    .share-inline-form,
    .share-inline-form-wide {
        grid-template-columns: 1fr;
    }

    .share-view-shell {
        padding: 14px;
    }

    .share-view-card {
        padding: 20px;
        border-radius: 22px;
    }

    .share-todo-remind {
        text-align: left;
    }
}
