:where(.window,.modal-overlay) button,:where(.window,.modal-overlay) input,:where(.window,.modal-overlay) select,:where(.window,.modal-overlay) textarea{position:static;float:none;margin:0;line-height:inherit;font-weight:normal}
:where(.window,.modal-overlay) button{width:auto;height:auto;padding:0;border:0;background:transparent;color:inherit;border-radius:0}
:where(.window,.modal-overlay) input,:where(.window,.modal-overlay) select{width:auto;height:auto;padding:0;border:0;background:transparent;color:inherit}
:where(.window,.modal-overlay) textarea{height:auto;padding:0;border:0;background:transparent;color:inherit;resize:vertical}

.window {
    position: relative;
    min-height: 30rem;
    border: 1px solid #eee;
    display: flex;
    overflow: hidden;
    border-radius: 3px;
}

body.night .window{
    border:1px solid #444;
}

.sidebar {
    width: 15rem;
    flex-shrink: 0;
    background: #fcfcfd;
    border-right: 1px solid #eef0f3;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

body.night .sidebar {
    border-right: 1px solid #444;
    background-color: #333;
}

.searchInputdiv{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.searchInput {
    width: calc(100% - 34px - 0.25rem);
    padding: 0 0.7rem;
    height: 34px;
    border: none;
    border-radius: 3px;
    outline: none;
    transition: box-shadow .2s;
    border: 1px solid #eee;
}

.searchInputdiv button{
    width: 34px;
    height: 34px;
    border: 0;
    background-color: #f1f2f6;
    color: #888;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid #eee;
}

.searchInputdiv button i{
    font-size: 0.65rem;
    font-weight: bold;
}

body.night .searchInputdiv button{
    background-color: #181a1b;
    border: 1px solid #444;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.stat {
    position: relative;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    min-height: 2rem;
    cursor: pointer;
    user-select: none;
    transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .07)
}

.stat-num {
    font-size: 0.8rem;
    line-height: 1.4;
}

.stat-label {
    margin-top: 0.2rem;
}

.stat-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.stat-icon i {
    font-size: 0.4rem;
}

.stat.today {
    background: #e4eefd;
    color: #2e7bf6
}

body.night .stat.today {
    background: #444;
    color: #bbb;
}

.stat.today .stat-icon {
    background: #2e7bf6
}

.stat.planned {
    background: #fdefe2;
    color: #ec8a17
}

body.night .stat.planned {
    background: #444;
    color: #bbb;
}

.stat.planned .stat-icon {
    background: #f2921d
}

.stat.planned .stat-icon i{
    font-size: 0.6rem;
}

.stat.all {
    background: #eaecfb;
    color: #5b67d8
}

body.night .stat.all {
    background: #444;
    color: #bbb;
}

.stat.all .stat-icon {
    background: #6272e3
}

.stat.done {
    background: #eef0f3;
    color: #5c6672
}

body.night .stat.done {
    background: #444;
    color: #bbb;
}

.stat.done .stat-icon {
    background: #6a7480
}

.stat.done .stat-icon i{
    font-size: 0.6rem;
}

.stat.today.selected {
    background: #2e7bf6;
    color: #fff
}

.stat.today.selected .stat-icon {
    background: rgba(255, 255, 255, .25)
}

.stat.planned.selected {
    background: #f2921d;
    color: #fff
}

.stat.planned.selected .stat-icon {
    background: rgba(255, 255, 255, .28)
}

.stat.all.selected {
    background: #6272e3;
    color: #fff
}

.stat.all.selected .stat-icon {
    background: rgba(255, 255, 255, .28)
}

.stat.done.selected {
    background: #6a7480;
    color: #fff
}

.stat.done.selected .stat-icon {
    background: rgba(255, 255, 255, .28)
}

.sectiondiv{
    flex: 1 1 auto;
    border:1px solid #eee;
}

body.night .sectiondiv{
    border:1px solid #444;
}

.section-label {
    border-bottom: 1px solid #eee;
    line-height: 1.5rem;
    padding-left: 0.5rem;
    background-color: #f1f2f6;
}

body.night .section-label{
    border-bottom: 1px solid #444;
    background-color: #444;
    color: #aaa;
}

.lists {
    min-height: 60px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.4rem;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s
}

.list-row:hover {
    background: #f3f4f7
}

body.night .list-row:hover {
    background: #444;
}

.list-row.selected {
    background: #f4f5f7;
    box-shadow: inset 3px 0 0 #2e7bf6
}

body.night .list-row.selected{
    background: #444;
}

.list-ico {
    width: 1rem;
    height: 1rem;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.list-ico i {
    font-size: 0.4rem;
}

.list-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.list-rename-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #2e7bf6;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.65rem;
    background: #fff;
    color: inherit;
    outline: none;
    height: auto;
}

body.night .list-rename-input {
    background: #181a1b;
    border-color: #444;
    color: #eee;
}

.list-count {
    min-width: 1rem;
    height: 1rem;
    border-radius: 100%;
    background: #eceef1;
    color: #8a93a0;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.night .list-count{
    background-color: #444;
    color: #aaa;
}

.list-row.selected .list-count {
    background: #d4e1e8;
}

body.night .list-row.selected .list-count{
    background: #232627;
}

.list-del {
    opacity: 0;
    border: none;
    background: transparent;
    color: #b6bcc6;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    line-height: 0;
    transition: all .15s
}

.list-del i{
    font-size: 0.6rem;
}

.list-row:hover .list-del {
    opacity: 1
}

.list-del:hover {
    color: #e5484d;
}

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

.data-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: #f0f1f4;
    color: #5c6672;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0;
    font-size: 0.5rem;
    cursor: pointer;
    transition: all .15s;
}

body.night .data-btn{
    background: #444;
    color: #bbb;
}

.data-btn i {
    font-size: 0.6rem;
}

.btn-new-list {
    background: #e9f7ee;
    color: #33a05a;
    border: none;
    border-radius: 6px;
    padding: 0.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s;
}

body.night .btn-new-list {
    background: #444;
    color: #bbb;
}

.btn-new-list i {
   font-size: 0.6rem;
}

.maintodo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0
}

.maintodo-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    position: relative;
}

.maintodo-scroll::-webkit-scrollbar {
    width: 4px;
    height: 8px;
}

.maintodo-scroll::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 4px;
}

body.night .maintodo-scroll::-webkit-scrollbar-track {
    background: #232627;
    border-radius: 4px;
}

.maintodo-scroll::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 4px;
}

body.night .maintodo-scroll::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.cebutdiv{
    position: absolute;
    border: 1px solid #eee;
    height: 1.2rem;
    width: 1.2rem;
    display: inline-block;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 3px;
    background-color: #f1f2f6;
    color: #444;
}

body.night .cebutdiv{
    border: 1px solid #444;
    background-color: #181a1b;
    color: #aaa;
}

.cebutdiv i{
    font-size: 0.6rem;
}

#viewTitle {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    padding-left: 1.8rem;
}

#viewTitle.renamable {
    cursor: pointer;
}

.maintodo-scroll > .list-rename-input {
    display: block;
    width: auto;
    margin-left: 1.8rem;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eef0f3;
    font-size: 0.55rem;
    color: #9aa3af;
}

body.night .meta-row{
    border-bottom: 1px solid #444;
}

.link-btn {
    background: none;
    border: none;
    color: #9aa3af;
    cursor: pointer;
    transition: color .15s
}

.link-btn:hover {
    color: #2e7bf6
}

.task-list {
    margin-top: 6px;
    max-height: 20rem;
}

.task {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 6px;
    border-bottom: 1px solid #f1f2f5;
    transition: background .15s;
    animation: fadeIn .18s ease
}

body.night .task{
    border-bottom: 1px solid #444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(3px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.task:hover {
    background: #fafbfd
}

body.night .task:hover {
    background: #444;
}

.check {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 6px;
    border: 1px solid #d3d7de;
    background: transparent;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0;
    transition: all .2s;
}

.check:hover {
    border-color: #2e7bf6
}

.check.checked {
    background: #2e7bf6;
    border-color: #2e7bf6
}

.check svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(.4);
    transition: all .2s
}

.check.checked svg {
    opacity: 1;
    transform: scale(1)
}

.t-body {
    flex: 1;
    min-width: 0
}

.t-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    word-break: break-all;
    cursor: text;
    line-height: 1.45
}

.t-title.done {
    color: #a6adb8;
    text-decoration: line-through
}

.t-sub {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 5px;
    font-size: 12px;
    flex-wrap: wrap;
    display: none;
}

.chip {
    padding: 2px 8px;
    border-radius: 6px;
    background: #f0f1f4;
    color: #8a93a0
}

.chip.todayc {
    background: #e4eefd;
    color: #2e7bf6;
    font-weight: 600
}

.chip.overdue {
    background: #fdecec;
    color: #e5484d
}

.task.overdue {
    box-shadow: inset 3px 0 0 #e5484d
}

.task.near {
    box-shadow: inset 3px 0 0 #f2921d
}

.t-list {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #8a93a0
}

.t-list i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block
}

.t-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity .15s;
    margin-top: 1px
}

.task:hover .t-actions {
    opacity: 1
}

.icon-btn {
    border: none;
    background: transparent;
    color: #b6bcc6;
    cursor: pointer;
    padding: 5px;
    border-radius: 7px;
    line-height: 0;
    transition: all .15s
}

.icon-btn:hover {
    background: #f0f1f4
}

.icon-btn.act-edit:hover {
    color: #2e7bf6
}

.icon-btn.act-del:hover {
    color: #e5484d
}

.icon-btn i {
   font-size: 0.6rem;
}

.empty {
    text-align: center;
    color: #c6ccd6;
    font-size: 1rem;
    letter-spacing: 3px;
    padding-top: 12.3rem;
}

body.night .empty{
    color: #444;
}

@media (hover:none) {

    .t-actions,
    .list-del {
        opacity: 1
    }
}

.composer-wrap {
    padding: 0.75rem 0.75rem;
    border-top: 1px solid #eee;
}

body.night .composer-wrap{
    border-top: 1px solid #444;
}

.composer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f2f3f6;
    border-radius: 3px;
    padding: 0.4rem 0.5rem;
    transition: box-shadow .2s;
}

body.night .composer{
    background-color: #444;
}

.composer.active {
    box-shadow: 0 0 0 2px rgba(47, 123, 246, .20)
}

#composerInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.6rem;
    outline: none;
    min-width: 60px;
    height: auto;
}

#composerInput::placeholder {
    color: #b3bac4
}

.btn-send {
    border: none;
    background: transparent;
    color: #a7aeb9;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
    border-radius: 8px;
    transition: color .15s;
    flex-shrink: 0
}

.btn-send:hover {
    color: #2e7bf6
}

.btn-send svg {
    width: 20px;
    height: 20px
}

.e-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.e-row .e-hint {
    color: #a7aeb9;
    flex: 0 0 auto;
    white-space: nowrap;
}

.e-row textarea{
    width: 100%;
    border: 1px solid #eee;
    min-height: 5rem;
    padding: 0.5rem;
    height: auto;
    resize: vertical !important;
}

.e-date,.e-list {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 6px 8px;
    background: #fff;
    flex:1;
    height: auto;
}

#editRepeatNum{
    flex:0 1 7rem;
}

.e-row-rep {
    flex-wrap: nowrap;
}

.e-row-rep #editRepeat {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.e-row-rep #editRepeatNum {
    flex: 0 0 5rem;
    width: 5rem;
    min-width: 0;
    padding: 6px 6px;
    text-align: center;
}

body.night .e-date,body.night .e-list {
    background-color: #181a1b;
    border: 1px solid #444;
    color: #bbb;
}

.btn {
    border: none;
    border-radius: 3px;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    transition: opacity .15s;
}

.btn.primary {
    background: #2e7bf6;
    color: #fff
}

.btn.ghost {
    background: #f0f1f4;
    color: #666
}

body.night .btn.ghost{
    color: #bbb;
    background-color: #444;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 26, 40, .35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999
}

.modal-overlay.hidden {
    display: none
}

.modal {
    background: #fff;
    border-radius: 6px;
    padding: 0.5rem 1rem 1rem 1rem;
    max-width: 17rem;
    width: 100%;
}

body.night .modal{
    background-color: #242627;
    border: 1px solid #444;
}

.modal .title {
    margin-bottom: 0.7rem;
    font-size: 0.7rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    height: auto;
    line-height: inherit;
    color: inherit;
}

body.night .modal .title {
    border-bottom: 1px solid #444;
    color: #bbb;
}

#newListName {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 0.5rem 0.6rem;
    height: auto;
}

body.night #newListName{
    border: 1px solid #444;
}

.swatches {
    display: flex;
    gap: 9px;
    margin: 14px 0 18px;
    flex-wrap: wrap
}

.swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s
}

.swatch:hover {
    transform: scale(1.12)
}

.swatch.active {
    border-color: #3a3f4a;
    box-shadow: inset 0 0 0 2px #fff
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px
}

.import-info {
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.sidbarnav{
    display: none;
}

@media (max-width:1240px) {
    .sidebar{
        display: none;
        position: absolute;
        z-index: 99;
        min-height: 30rem;
    }
    .sidbarnav{
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .sidbarnav i{
        font-size: 0.6rem;
        cursor: pointer;
    }
    .maintodo-scroll {
        padding: 0.5rem 0.5rem;
    }
}

@media (max-width:450px) {
    .sidebar{
        width: 100%;
        max-width: 100%;
    }
}
