/* =========================
   THEME
========================= */
:root {
    --bg: #0D0714;
    --panel: #1a0f27;
    --panel-2: #1e0f2c;
    --panel-3: rgba(59, 28, 100, 0.38);

    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.62);

    --accent: #9E78CF;
    --accent-2: #c79dff;
    --accent-soft: rgba(158, 120, 207, 0.18);

    --border: rgba(158, 120, 207, 0.25);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

    --radius: 16px;
    --radius-sm: 12px;

    --sidebar-w: 220px;
    --sidebar-frame-offset: 12px;
    --content-side-gap: 18px;
    --bg-image-offset: 54px;
}

/* =========================
   BASE
========================= */
* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100svh;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(158, 120, 207, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(199, 157, 255, 0.08), transparent 55%),
    var(--bg);
    font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    color: var(--text);
    overflow-x: hidden;
    overflow-y: hidden;
}

.bi {
    line-height: 1;
}

a {
    color: inherit;
}

a:hover {
    color: inherit;
}

/* =========================
   BACKGROUND DECOR IMAGE
========================= */
.place-img {
    position: fixed;
    left: max(0px, calc(var(--sidebar-w) - var(--bg-image-offset)));
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    filter: saturate(1.1) contrast(1.05);
}

.img-place {
    display: block;
    width: min(760px, 52vw);
    height: auto;
}

/* =========================
   SIDEBAR
========================= */
.sidebar-left .sidebar {
    position: fixed;
    top: 12px;
    left: 12px;
    width: calc(var(--sidebar-w) - var(--sidebar-frame-offset));
    height: calc(100vh - 24px);
    z-index: 1000;
    background: linear-gradient(180deg, rgba(45, 22, 71, 0.82), rgba(26, 15, 39, 0.9)),
    radial-gradient(300px 140px at 100% 0%, rgba(199, 157, 255, 0.08), transparent 70%);
    border: 1px solid rgba(158, 120, 207, 0.18);
    border-radius: 26px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    overflow: hidden;
    isolation: isolate;
}

.mobile-sidebar-toggle,
.mobile-sidebar-backdrop {
    display: none;
}

.mobile-title-bar {
    display: contents;
}

.mobile-sidebar-toggle {
    position: relative;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 11, 28, 0.96), rgba(13, 8, 20, 0.94));
    color: rgba(231, 221, 249, 0.92);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
    z-index: 3;
}

.mobile-sidebar-toggle i,
.mobile-sidebar-toggle i {
    font-size: 24px;
    line-height: 1;
}

.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 4, 12, 0.72);
    backdrop-filter: blur(4px);
    z-index: 1025;
}

.sidebar-stack {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar .sticky-top {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.logout-btn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: rgba(158, 120, 207, 0.18);
    color: #fff;
}

/* top nav */
.nav.nav-pills {
    padding-top: 10px;
    margin-bottom: 0 !important;
    gap: 8px;
}

.nav-link {
    border-radius: 14px !important;
    transition: 0.18s ease;
    color: rgba(255, 255, 255, 0.82) !important;
}

.nav-link i {
    color: var(--accent);
    transition: 0.18s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.nav-link:hover i {
    color: var(--accent-2);
    transform: translateY(-1px);
}

/* profile dropdown */
.dropdown {
    padding: 10px 0 6px;
}

.dropdown-toggle {
    border-radius: 14px;
    transition: 0.18s ease;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    background: var(--panel-2);
    transition: 0.22s ease;
}

.dropdown-toggle:hover .user-avatar {
    transform: scale(1.06);
    box-shadow: 0 0 14px rgba(158, 120, 207, 0.55);
    border-color: var(--accent-2);
}

.extra-info {
    padding: 6px 12px 2px;
    text-align: center;
}

.name-profile {
    margin: 6px 0 2px;
    font-weight: 800;
    font-size: 18px;
    color: var(--accent);
    line-height: 1.1;
}

.email-profile {
    margin: 0;
    font-weight: 500;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    word-break: break-all;
}

/* dropdown menu */
.dropdown-menu {
    background: var(--panel-2) !important;
    border: 1px solid rgba(158, 120, 207, 0.22) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow) !important;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dropdown-item:hover {
    background: rgba(158, 120, 207, 0.18) !important;
    color: #fff !important;
}

/* =========================
   LISTS PANEL
========================= */
.lists-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 10px 12px;
    gap: 10px;
}

.lists-title {
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.85);
    padding: 0 8px;
    text-transform: uppercase;
}

.lists-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px;
}

.lists-scroll::-webkit-scrollbar {
    width: 8px;
}

.lists-scroll::-webkit-scrollbar-thumb {
    background: rgba(158, 120, 207, 0.35);
    border-radius: 999px;
}

.lists-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.list-row {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(158, 120, 207, 0.14);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    transition: 0.18s ease;
}

.list-row:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(158, 120, 207, 0.28);
}

.list-row.is-active {
    background: rgba(158, 120, 207, 0.85);
    border-color: rgba(199, 157, 255, 0.65);
    color: #120a1c;
}

.list-row.list-row--selected {
    background: rgba(120, 24, 44, 0.34);
    border-color: rgba(255, 123, 154, 0.68);
    box-shadow: 0 0 0 1px rgba(255, 123, 154, 0.3);
    color: #fff2f5;
}

.list-row__link {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 16px 14px;
    border-radius: 10px;
    text-decoration: none;
}

.list-row__link:hover {
    color: inherit;
}

.list-row__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    font-size: 13px;
}

.list-row__delete {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: 0.18s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.list-row__delete .bi-trash3 {
    font-size: 14px;
}

.list-row__delete:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.list-row.is-active .list-row__delete {
    background: rgba(18, 10, 28, 0.14);
    color: rgba(18, 10, 28, 0.68);
}

.list-row.is-active .list-row__delete:hover {
    background: rgba(18, 10, 28, 0.24);
    color: #120a1c;
}

.list-row__delete-form {
    display: none;
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lists-panel--delete-mode .list-row__link {
    padding-right: 14px;
}

.lists-panel--delete-mode .list-row {
    cursor: pointer;
}

.lists-panel--delete-mode .list-row__link {
    pointer-events: none;
}

.lists-actions {
    margin-top: auto;
    padding: 6px 4px 2px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-action-btn {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(158, 120, 207, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition: 0.18s ease;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(199, 157, 255, 0.42);
}

.sidebar-action-btn--delete {
    background: rgba(120, 24, 44, 0.16);
    border-color: rgba(255, 123, 154, 0.2);
    color: rgba(255, 208, 218, 0.92);
}

.sidebar-action-btn--delete:hover {
    background: rgba(120, 24, 44, 0.24);
    border-color: rgba(255, 123, 154, 0.34);
    color: #fff;
}

.sidebar-action-btn--cancel {
    display: none;
}

.lists-panel--delete-mode .sidebar-action-btn--cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   MAIN CONTENT
========================= */
main.tasks {
    margin-left: var(--sidebar-w);
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 22px 16px 16px;
}

.tasks > :not(.modal) {
    position: relative;
    z-index: 2;
}

.tasks > .modal {
    position: fixed;
    z-index: 1055;
}

#newListModal,
#settingsModal {
    z-index: 1055;
}

#newListModal .modal-dialog,
#settingsModal .modal-dialog {
    position: relative;
    z-index: 1060;
}

.tasks-head {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-bottom: 8px;
}

.main__tasks {
    margin: 10px 0 0;
    font-weight: 900;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.05;
    letter-spacing: 0.5px;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.mobile-overview-copy {
    display: none;
}

.sun__img {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 80px;
    opacity: 0.85;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
    z-index: 1;
}

.center-tasks,
.input-group,
.btn-tasks {
    width: 100%;
    max-width: 720px;
}

.task-view-shell {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 18px 0 10px;
}

.task-view-frame {
    width: min(1040px, calc(100vw - var(--sidebar-w) - 88px - var(--content-side-gap)));
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 auto;
    padding: clamp(18px, 2vw, 24px) clamp(18px, 3vw, 40px) 18px;
    background: linear-gradient(180deg, rgba(34, 18, 50, 0.82), rgba(19, 11, 30, 0.72)),
    radial-gradient(600px 240px at 100% 0%, rgba(158, 120, 207, 0.12), transparent 65%);
    border: 1px solid rgba(158, 120, 207, 0.16);
    border-radius: 28px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

/* =========================
   HOME LISTS OVERVIEW
========================= */
.home-lists-shell {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 18px 0 10px;
}

.home-lists-frame {
    width: min(1040px, calc(100vw - var(--sidebar-w) - 88px - var(--content-side-gap)));
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0 auto;
    padding: clamp(18px, 2vw, 24px) clamp(18px, 3vw, 40px) 18px;
    background: linear-gradient(180deg, rgba(34, 18, 50, 0.82), rgba(19, 11, 30, 0.72)),
    radial-gradient(600px 240px at 100% 0%, rgba(158, 120, 207, 0.12), transparent 65%);
    border: 1px solid rgba(158, 120, 207, 0.16);
    border-radius: 28px;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.home-lists-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 2px 0;
}

.home-lists-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(199, 157, 255, 0.78);
}

.home-main-title {
    margin-top: 0;
}

.home-lists-subtitle {
    max-width: 640px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.64);
    font-size: 15px;
    line-height: 1.6;
}

.home-new-list-btn {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(158, 120, 207, 0.26);
    background: linear-gradient(180deg, rgba(158, 120, 207, 0.94), rgba(130, 90, 190, 0.94));
    color: #130a1c;
    font-weight: 900;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 24px rgba(158, 120, 207, 0.22);
    transition: 0.18s ease;
}

.home-new-list-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(199, 157, 255, 0.98), rgba(158, 120, 207, 0.96));
}

.home-lists-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 4px 10px;
}

.home-lists-scroll::-webkit-scrollbar {
    width: 10px;
}

.home-lists-scroll::-webkit-scrollbar-thumb {
    background: rgba(158, 120, 207, 0.35);
    border-radius: 999px;
}

.home-lists-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.home-lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-content: start;
}

.home-list-card {
    min-height: 280px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 20px;
    background: linear-gradient(180deg, rgba(33, 17, 49, 0.94), rgba(22, 12, 34, 0.92)),
    radial-gradient(240px 100px at 100% 0%, rgba(199, 157, 255, 0.09), transparent 70%);
    border: 1px solid rgba(158, 120, 207, 0.18);
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    transition: 0.18s ease;
    overflow: hidden;
}

.home-list-card:hover {
    transform: translateY(-2px);
    border-color: rgba(199, 157, 255, 0.38);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.home-list-card--preview {
    min-height: 240px;
}

.home-list-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.home-list-card__eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(199, 157, 255, 0.68);
}

.home-list-card__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.96);
    word-break: break-word;
    max-width: 18ch;
}

.home-list-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    color: rgba(240, 232, 255, 0.96);
    background: rgba(158, 120, 207, 0.14);
    border: 1px solid rgba(158, 120, 207, 0.25);
    transition: 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-list-card__link:hover {
    background: rgba(158, 120, 207, 0.22);
    border-color: rgba(199, 157, 255, 0.48);
}

.home-list-card__tasks {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px 4px 2px 0;
}

.home-list-card__tasks::-webkit-scrollbar {
    width: 8px;
}

.home-list-card__tasks::-webkit-scrollbar-thumb {
    background: rgba(158, 120, 207, 0.32);
    border-radius: 999px;
}

.home-list-card__tasks::-webkit-scrollbar-track {
    background: transparent;
}

.home-task-chip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(158, 120, 207, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: 0.18s ease;
}

.home-task-chip:hover {
    border-color: rgba(199, 157, 255, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.home-task-chip.is-completed {
    opacity: 0.72;
}

.home-task-chip__state {
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #130a1c;
    background: rgba(199, 157, 255, 0.95);
}

.home-task-chip.is-completed .home-task-chip__state {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
}

.home-task-chip__text {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.5;
    font-size: 15px;
    word-break: break-word;
}

.home-list-card__empty,
.home-empty-state__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.6;
}

.home-list-card__empty {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(158, 120, 207, 0.18);
}

.home-empty-state {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 34px 24px;
    border-radius: 22px;
    background: rgba(30, 15, 44, 0.75);
    border: 1px solid rgba(158, 120, 207, 0.18);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.home-empty-state__title {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.96);
}

/* =========================
   COMMON INPUTS / BUTTONS
========================= */
.add-todo-form {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.task-compose-shell {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.task-compose {
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 0 10px;
}

.task-compose-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.input-group {
    margin: 0 auto;
}

.form-control {
    background: rgba(30, 15, 44, 0.78) !important;
    border: 1px solid rgba(158, 120, 207, 0.35) !important;
    color: rgba(240, 232, 255, 0.95) !important;
    border-radius: 14px !important;
    height: 56px !important;
    padding: 0.85rem 1rem;
    box-shadow: none !important;
}

.form-control::placeholder {
    color: rgba(184, 154, 255, 0.55) !important;
}

.form-control:focus {
    border-color: rgba(199, 157, 255, 0.8) !important;
    box-shadow: 0 0 0 4px rgba(158, 120, 207, 0.22) !important;
}

.btn-add {
    height: 51px;
    min-width: 87px;
    border-radius: 20px;
    border: 1px solid rgba(158, 120, 207, 0.25);
    background: linear-gradient(180deg, rgba(158, 120, 207, 0.95), rgba(130, 90, 190, 0.95));
    color: #130a1c;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition: 0.18s ease;
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(158, 120, 207, 0.25);
    background: linear-gradient(180deg, rgba(199, 157, 255, 0.98), rgba(158, 120, 207, 0.96));
}

#todoNewText {
    min-height: 51px !important;
    height: auto !important;
    max-height: 160px;
    padding: 13px 16px !important;
    line-height: 1.45;
    border-radius: 20px !important;
    resize: none;
    overflow: hidden;
    display: block;
    field-sizing: content;
}

.task-new-list-btn {
    min-width: 112px;
}

.btn-add.task-new-list-btn {
    height: 51px;
    min-width: 112px;
    padding: 0 18px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.btn-add.task-new-list-btn:hover {
    box-shadow: 0 10px 26px rgba(158, 120, 207, 0.25);
}

.btn {
    border-radius: 12px !important;
    border: 1px solid rgba(158, 120, 207, 0.25) !important;
    background: rgba(158, 120, 207, 0.14) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    transition: 0.18s ease !important;
}

.btn:hover {
    background: rgba(158, 120, 207, 0.22) !important;
    border-color: rgba(199, 157, 255, 0.55) !important;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* =========================
   FILTER TABS
========================= */
.btn-tasks {
    display: flex;
    justify-content: flex-start;
    margin: 0 auto;
}

.filters {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(158, 120, 207, 0.16);
    color: rgba(255, 255, 255, 0.72);
    transition: 0.18s ease;
    user-select: none;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(158, 120, 207, 0.28);
    transform: translateY(-1px);
}

.tab.is-selected {
    background: rgba(158, 120, 207, 0.22);
    border-color: rgba(199, 157, 255, 0.6);
    color: rgba(240, 232, 255, 0.98);
    box-shadow: 0 8px 22px rgba(158, 120, 207, 0.18);
    text-decoration: none;
}

/* =========================
   TODOS
========================= */
.todos-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 14px;
}

.todos-scroll::-webkit-scrollbar {
    width: 10px;
}

.todos-scroll::-webkit-scrollbar-thumb {
    background: rgba(158, 120, 207, 0.35);
    border-radius: 999px;
}

.todos-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.todo-list {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 6px;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-inline-form {
    width: 100%;
    margin: 0;
}

.todo-item-row {
    width: 100%;
    display: flex;
    align-items: center;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    background: rgba(30, 15, 44, 0.82);
    border: 1px solid rgba(158, 120, 207, 0.18);
    border-radius: 16px;
    padding: 22px 20px;
    min-height: 78px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: 0.18s ease;
}

.todo-item-row:hover {
    transform: translateY(-2px);
    border-color: rgba(199, 157, 255, 0.35);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
}

.todo-toggle-btn {
    min-width: 88px;
    min-height: 42px;
    padding: 0 12px !important;
    border-radius: 999px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.todo-toggle-btn__icon {
    font-size: 16px;
    line-height: 1;
}

.todo-toggle-btn__label {
    font-size: 13px;
    letter-spacing: 0.2px;
}

.todo-toggle-btn--complete {
    background: rgba(158, 120, 207, 0.18) !important;
    border: 1px solid rgba(158, 120, 207, 0.32) !important;
    color: #fff !important;
}

.todo-toggle-btn--complete:hover {
    background: rgba(158, 120, 207, 0.28) !important;
    border-color: rgba(199, 157, 255, 0.55) !important;
}

.todo-toggle-btn--empty {
    color: rgba(255, 255, 255, 0.95) !important;
}

.todo-toggle-btn--restore {
    background: rgba(158, 120, 207, 0.24) !important;
    border: 1px solid rgba(199, 157, 255, 0.4) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.todo-toggle-btn--restore:hover {
    background: rgba(199, 157, 255, 0.3) !important;
    border-color: rgba(199, 157, 255, 0.58) !important;
}

/* checkbox */
.todo-status {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* editable todo field */
.todo-inline-input {
    flex: 1 1 auto;
    min-width: 0;
    width: calc(100% - 122px);
    min-height: 40px;
    max-height: 200px;
    resize: none;
    overflow: hidden;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    outline: none;
    box-shadow: none;
    transition: 0.18s ease;
}

.todo-inline-input:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(158, 120, 207, 0.14);
}

.todo-inline-input:focus {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(199, 157, 255, 0.34);
    box-shadow: 0 0 0 3px rgba(158, 120, 207, 0.08);
}

.todo-inline-input.is-completed,
.todo-inline-input--completed {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: line-through;
}

.todo-inline-input--completed:hover,
.todo-inline-input--completed:focus {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.todo-inline-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* small action buttons */
.todo-actions {
    flex: 0 0 100%;
    margin-top: 4px;
}

.todo-actions > [class*="col-"] {
    display: flex;
}

.todo-actions .btn {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 14px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    font-size: 14px;
    font-weight: 800;
}

.todo-btn-save {
    background: rgba(158, 120, 207, 0.14) !important;
    border: 1px solid rgba(158, 120, 207, 0.24) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.todo-btn-save:hover {
    background: rgba(158, 120, 207, 0.24) !important;
    border-color: rgba(199, 157, 255, 0.46) !important;
    box-shadow: 0 6px 14px rgba(158, 120, 207, 0.12);
}

.todo-btn-delete {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.todo-btn-delete:hover {
    background: rgba(255, 80, 120, 0.12) !important;
    border-color: rgba(255, 80, 120, 0.2) !important;
}

.todo-item-row--completed {
    background: rgba(22, 12, 31, 0.58);
    border-color: rgba(158, 120, 207, 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.todo-item-row--completed:hover {
    transform: none;
    border-color: rgba(158, 120, 207, 0.18);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.todo-item-row--completed .todo-inline-input {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: line-through;
}

.todo-item-row--completed .todo-actions .btn,
.todo-item-row--completed .todo-toggle-btn {
    filter: saturate(0.9);
}

.todo-item-completed {
    opacity: 0.92;
}

.empty-todos {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.52);
    font-weight: 600;
}

/* =========================
   MODALS
========================= */
.modal-backdrop.show {
    background-color: #000;
    opacity: 0.82;
}

.modal-content.list-modal {
    background: rgba(30, 15, 44, 0.92) !important;
    border: 1px solid rgba(158, 120, 207, 0.26) !important;
    border-radius: 18px !important;
    color: #fff !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(10px);
}

.list-modal .modal-title {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95);
}

.list-modal .btn-close {
    filter: invert(1);
    opacity: 0.9;
}

.list-modal .btn-close:hover {
    opacity: 1;
}

.list-input {
    background: rgba(30, 15, 44, 0.78) !important;
    border: 1px solid rgba(158, 120, 207, 0.35) !important;
    color: rgba(240, 232, 255, 0.95) !important;
    border-radius: 14px !important;
    height: 56px !important;
}

.btn-register {
    background: linear-gradient(180deg, rgba(158, 120, 207, 0.95), rgba(130, 90, 190, 0.95)) !important;
    border: 1px solid rgba(158, 120, 207, 0.25) !important;
    color: #130a1c !important;
    font-weight: 900 !important;
    border-radius: 14px !important;
    padding: 12px 16px !important;
}

.btn-register:hover {
    background: linear-gradient(180deg, rgba(199, 157, 255, 0.98), rgba(158, 120, 207, 0.96)) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(158, 120, 207, 0.25);
}

/* =========================
   SETTINGS MODAL
========================= */
#settingsModal .modal-content {
    background: rgba(30, 15, 44, 0.92) !important;
    border: 1px solid rgba(158, 120, 207, 0.26) !important;
    border-radius: 18px !important;
    color: #fff !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(10px);
}

#settingsModal .modal-title {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95);
}

#settingsModal .btn-close {
    filter: invert(1);
    opacity: 0.9;
}

#settingsModal .btn-close:hover {
    opacity: 1;
}

.settings-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    background: var(--panel-2);
    box-shadow: 0 8px 24px rgba(158, 120, 207, 0.35);
}

.settings-form .form-label {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.settings-form .form-control {
    background: rgba(30, 15, 44, 0.78) !important;
    border: 1px solid rgba(158, 120, 207, 0.35) !important;
    color: rgba(240, 232, 255, 0.95) !important;
    border-radius: 14px !important;
    height: 50px !important;
    padding: 0.75rem 1rem;
}

.settings-form .form-control::placeholder {
    color: rgba(184, 154, 255, 0.55) !important;
}

.settings-form .form-control:focus {
    border-color: rgba(199, 157, 255, 0.8) !important;
    box-shadow: 0 0 0 4px rgba(158, 120, 207, 0.22) !important;
}

.settings-form input[type="file"] {
    background: rgba(30, 15, 44, 0.65) !important;
    border: 1px dashed rgba(158, 120, 207, 0.35) !important;
    color: rgba(255, 255, 255, 0.75) !important;
    border-radius: 12px !important;
    padding: 8px 12px;
}

.settings-form input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(180deg, rgba(158, 120, 207, 0.85), rgba(130, 90, 190, 0.85));
    border: none;
    border-radius: 10px;
    color: #130a1c;
    font-weight: 700;
    padding: 8px 14px;
    margin-right: 10px;
    cursor: pointer;
    transition: 0.18s ease;
}

.settings-form input[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(180deg, rgba(199, 157, 255, 0.95), rgba(158, 120, 207, 0.9));
}

.settings-link {
    color: rgba(199, 157, 255, 0.95);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(158, 120, 207, 0.12);
    border: 1px solid rgba(158, 120, 207, 0.22);
    transition: 0.18s ease;
}

.settings-link:hover {
    color: rgba(199, 157, 255, 1);
    background: rgba(158, 120, 207, 0.18);
    border-color: rgba(199, 157, 255, 0.45);
    transform: translateY(-1px);
}

.settings-link i {
    font-size: 14px;
}

/* =========================
   REGISTER / LOGIN
========================= */
.login-user-error {
    margin-top: 8px;
    color: #dc3545;
    font-size: 0.95rem;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    padding: 28px;
}

.auth-sidebar {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
    padding: 18px 18px 22px;
    background: linear-gradient(180deg, rgba(59, 28, 100, 0.42), rgba(30, 15, 44, 0.78));
    border: 1px solid rgba(158, 120, 207, 0.16);
    border-radius: 28px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.auth-sidebar__top {
    display: flex;
    justify-content: flex-start;
}

.auth-home-link {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(158, 120, 207, 0.18);
    color: var(--accent);
    text-decoration: none;
    transition: 0.18s ease;
}

.auth-home-link i {
    font-size: 24px;
}

.auth-home-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(199, 157, 255, 0.35);
    color: var(--accent-2);
    transform: translateY(-1px);
}

.auth-sidebar__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 20px 4px;
}

.auth-sidebar__kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: rgba(199, 157, 255, 0.76);
}

.auth-sidebar__title {
    margin: 0;
    font-size: clamp(30px, 3.1vw, 46px);
    font-weight: 950;
    line-height: 1.04;
    color: rgba(255, 255, 255, 0.97);
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.auth-sidebar__text {
    max-width: 26ch;
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.62);
}

.auth-sidebar__footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.auth-sidebar__badge,
.auth-sidebar__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(158, 120, 207, 0.12);
    border: 1px solid rgba(158, 120, 207, 0.22);
}

.auth-panel,
.register-container,
.login-container,
.change-password-container {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
}

.auth-card,
.register-card,
.login-card,
.change-password-card {
    width: min(100%, 620px);
    background: linear-gradient(180deg, rgba(31, 17, 46, 0.92), rgba(24, 13, 37, 0.9)),
    radial-gradient(360px 180px at 100% 0%, rgba(199, 157, 255, 0.08), transparent 70%);
    border: 1px solid rgba(158, 120, 207, 0.18);
    border-radius: 28px;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32);
    padding: 34px 30px 30px;
    backdrop-filter: blur(12px);
}

.auth-card__head {
    margin-bottom: 24px;
}

.auth-card__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(199, 157, 255, 0.75);
}

.register-title,
.login-title,
.change-password-title,
.auth-card__title {
    margin: 0;
    font-weight: 950;
    font-size: clamp(34px, 4vw, 44px);
    color: rgba(255, 255, 255, 0.96);
    line-height: 1.04;
}

.auth-card__subtitle {
    max-width: 44ch;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.6;
}

.auth-form {
    width: 100%;
}

.auth-label {
    color: rgba(255, 255, 255, 0.74);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-card__footnote p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.btn-login {
    background: linear-gradient(180deg, rgba(158, 120, 207, 0.95), rgba(130, 90, 190, 0.95)) !important;
    border: 1px solid rgba(158, 120, 207, 0.25) !important;
    color: #130a1c !important;
    font-weight: 900 !important;
    border-radius: 14px !important;
    padding: 12px 16px !important;
}

.btn-login:hover {
    background: linear-gradient(180deg, rgba(199, 157, 255, 0.98), rgba(158, 120, 207, 0.96)) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(158, 120, 207, 0.25);
}

.register-link,
.login-link {
    color: rgba(199, 157, 255, 0.95);
    text-decoration: none;
    font-weight: 700;
}

.register-link:hover,
.login-link:hover {
    color: rgba(199, 157, 255, 1);
    text-decoration: underline;
}

/* autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(30, 15, 44, 0.85) inset !important;
    box-shadow: 0 0 0 30px rgba(30, 15, 44, 0.85) inset !important;
    -webkit-text-fill-color: rgba(240, 232, 255, 0.95) !important;
}

/* =========================
   CHANGE PASSWORD PAGE
========================= */
.change-password-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.change-password-field {
    width: 100%;
    display: flex;
    justify-content: center;
}

.change-password-input {
    width: 40%;
    min-width: 180px;
}

.change-password-form .form-control {
    background: rgba(30, 15, 44, 0.78) !important;
    border: 1px solid rgba(158, 120, 207, 0.35) !important;
    color: rgba(240, 232, 255, 0.95) !important;
    border-radius: 14px !important;
    height: 56px !important;
    padding: 0.85rem 1rem;
}

.change-password-form .form-control::placeholder {
    color: rgba(184, 154, 255, 0.55) !important;
}

.change-password-form .form-control:focus {
    border-color: rgba(199, 157, 255, 0.8) !important;
    box-shadow: 0 0 0 4px rgba(158, 120, 207, 0.22) !important;
}

@media (max-width: 991px) {
    .task-view-frame,
    .home-lists-frame {
        width: min(100%, calc(100vw - var(--sidebar-w) - 28px - var(--content-side-gap)));
        padding: 0 10px;
        border-radius: 24px;
    }

    .home-lists-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-new-list-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .place-img {
        display: none;
    }

    body.mobile-sidebar-open {
        overflow: hidden;
    }

    .sidebar-left {
        max-width: none;
        padding: 0;
        position: static;
    }

    .sidebar-left > .row {
        margin: 0;
    }

    .sidebar-left .row > * {
        padding: 0;
    }

    .mobile-sidebar-toggle {
        display: inline-flex;
    }

    .mobile-sidebar-backdrop.is-visible {
        display: block;
    }

    body.mobile-sidebar-open .mobile-sidebar-toggle {
        display: none;
    }

    .sidebar-left .sidebar {
        width: min(88vw, 320px);
        height: calc(100svh - 24px);
        max-height: calc(100svh - 24px);
        position: fixed;
        top: 12px;
        left: 12px;
        border-radius: 26px;
        border: 1px solid rgba(158, 120, 207, 0.18);
        border-right: 1px solid rgba(158, 120, 207, 0.18);
        border-bottom: 1px solid rgba(158, 120, 207, 0.18);
        box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(16px);
        transform: translateX(calc(-100% - 24px));
        transition: transform 0.24s ease;
        z-index: 1030;
    }

    body.mobile-sidebar-open .sidebar-left .sidebar {
        transform: translateX(0);
    }

    .sidebar-stack,
    .sidebar .sticky-top {
        height: 100%;
    }

    .sidebar-stack {
        padding-top: 56px;
    }

    .nav.nav-pills {
        padding: 14px 12px 0;
        justify-content: flex-start;
        overflow-x: visible;
    }

    .dropdown {
        padding: 8px 12px 4px;
    }

    .extra-info {
        padding: 6px 2px 2px;
    }

    .lists-panel {
        padding: 8px 12px 14px;
    }

    .lists-scroll {
        max-height: none;
    }

    .lists-actions {
        flex-direction: row;
    }

    .sidebar-action-btn {
        min-height: 42px;
    }

    main.tasks {
        margin-left: 0;
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        overflow: visible;
        padding: calc(env(safe-area-inset-top, 0px) + 18px) 12px calc(env(safe-area-inset-bottom, 0px) + 20px);
    }

    .tasks-head {
        padding-top: 10px;
    }

    .sun__img {
        display: none;
    }

    .home-lists-shell {
        padding-top: 8px;
    }

    .task-view-shell,
    .home-lists-shell {
        padding: 8px 0 0;
    }

    .home-lists-frame {
        width: 100%;
        padding: 14px;
        border-radius: 22px;
    }

    .task-view-frame {
        width: 100%;
        padding: 14px;
        border-radius: 22px;
    }

    .mobile-title-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
        margin-top: -10px;
        margin-left: -10px;
    }

    .mobile-title-bar .main__tasks {
        margin-top: 0;
    }

    .task-compose {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    .task-compose-actions {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .task-compose-actions .btn-add,
    .task-compose-actions .task-new-list-btn {
        flex: 1 1 0;
    }

    .home-lists-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .filters {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .filters::-webkit-scrollbar {
        display: none;
    }

    .tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .home-list-card {
        min-height: 0;
        max-height: none;
        gap: 12px;
        padding: 16px 16px 14px;
        border-radius: 18px;
    }

    .home-lists-scroll,
    .todos-scroll {
        overflow: visible;
    }

    .home-list-card__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .home-list-card__title {
        max-width: none;
        font-size: 20px;
    }

    .home-list-card__eyebrow {
        margin-bottom: 6px;
    }

    .home-list-card__link {
        min-width: 0;
        padding: 9px 12px;
        font-size: 13px;
    }

    .home-list-card__tasks {
        gap: 8px;
        overflow: visible;
        padding: 0;
    }

    .home-task-chip {
        gap: 6px;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .home-task-chip__text {
        font-size: 14px;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .home-task-chip__state {
        padding: 4px 8px;
        font-size: 10px;
    }

    .home-list-card__tasks > :nth-child(n+4) {
        display: none;
    }

    .home-list-card__empty {
        padding: 12px;
        border-radius: 14px;
    }

    .mobile-overview-copy {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 14px;
    }

    .mobile-overview-copy__item {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 12px 14px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(158, 120, 207, 0.16);
    }

    .mobile-overview-copy__item span {
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: rgba(199, 157, 255, 0.76);
    }

    .mobile-overview-copy__item strong {
        color: rgba(255, 255, 255, 0.9);
        font-size: 14px;
        line-height: 1.4;
        font-weight: 800;
    }

    .todo-item-row {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 18px 16px;
    }

    .home-lists-kicker,
    .mobile-overview-copy {
        display: none;
    }

    .todo-status {
        width: 100%;
        justify-content: flex-start;
        padding-top: 0;
    }

    .todo-inline-input {
        width: 100%;
        min-height: 46px;
        padding: 4px 2px 0;
    }

    .todo-actions {
        width: 100%;
        padding-left: 0;
    }

    #newListModal .modal-dialog,
    #settingsModal .modal-dialog {
        margin: 12px auto;
        max-width: min(100% - 24px, 520px);
    }

    .list-modal .modal-body,
    #settingsModal .modal-body {
        padding: 16px;
    }

    .settings-avatar {
        width: 96px;
        height: 96px;
    }

    .auth-shell {
        padding: 12px;
    }

    .register-container,
    .login-container,
    .change-password-container {
        min-height: 100svh;
        align-items: flex-start;
        padding: calc(env(safe-area-inset-top, 0px) + 18px) 14px calc(env(safe-area-inset-bottom, 0px) + 18px);
    }

    .register-card,
    .login-card,
    .change-password-card {
        max-width: none;
        padding: 24px 18px;
        border-radius: 22px;
    }

    .register-title,
    .login-title,
    .change-password-title {
        font-size: clamp(30px, 10vw, 40px);
    }

    .change-password-input,
    .btn-change-password {
        width: 100%;
        min-width: 0;
    }
}

.change-password-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-change-password {
    width: 40%;
    min-width: 180px;
    background: linear-gradient(180deg, rgba(158, 120, 207, 0.95), rgba(130, 90, 190, 0.95)) !important;
    border: 1px solid rgba(158, 120, 207, 0.25) !important;
    color: #130a1c !important;
    font-weight: 900 !important;
    border-radius: 14px !important;
    padding: 12px 16px !important;
}

.btn-change-password:hover {
    background: linear-gradient(180deg, rgba(199, 157, 255, 0.98), rgba(158, 120, 207, 0.96)) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(158, 120, 207, 0.25);
}

.back-link {
    color: rgba(199, 157, 255, 0.95);
    text-decoration: none;
    font-weight: 700;
}

.back-link:hover {
    color: rgba(199, 157, 255, 1);
    text-decoration: underline;
}

/* restore plain auth pages without app sidebar */
.register-container,
.login-container,
.change-password-container {
    min-height: 100vh;
    padding: 28px 16px;
}

.register-card,
.login-card,
.change-password-card {
    width: 100%;
    max-width: 460px;
    background: rgba(30, 15, 44, 0.86);
    border: 1px solid rgba(158, 120, 207, 0.22);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 34px 26px;
    backdrop-filter: blur(10px);
}

.register-title,
.login-title,
.change-password-title {
    font-weight: 950;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-bottom: 18px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 290px minmax(0, 1fr);
        padding: 22px;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-w: 200px;
        --bg-image-offset: 84px;
    }

    main.tasks {
        padding: 18px 12px 12px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .auth-sidebar,
    .auth-panel {
        min-height: auto;
    }

    .auth-sidebar {
        padding: 16px;
    }

    .auth-sidebar__body {
        padding: 12px 2px;
    }

    .auth-sidebar__title,
    .auth-sidebar__text {
        max-width: none;
    }
}

@media (max-width: 720px) {
    :root {
        --sidebar-w: 190px;
        --bg-image-offset: 96px;
    }

    .sun__img {
        width: 64px;
    }

    .auth-shell {
        padding: 14px;
    }

    .auth-card,
    .register-card,
    .login-card,
    .change-password-card {
        padding: 24px 18px 20px;
        border-radius: 22px;
    }
}

@media (max-width: 560px) {
    :root {
        --sidebar-w: 170px;
        --bg-image-offset: 112px;
    }

    .name-profile {
        font-size: 16px;
    }

    .list-row__name {
        font-size: 12px;
    }

    .main__tasks {
        margin-top: 6px;
    }

    .btn-add {
        min-width: 82px;
    }

    .task-view-frame,
    .home-lists-frame {
        padding: 14px 12px;
        border-radius: 20px;
    }

    .main__tasks {
        font-size: clamp(28px, 10vw, 36px);
    }

    .home-lists-subtitle,
    .home-task-chip__text,
    .home-empty-state__text {
        font-size: 14px;
    }

    .home-list-card {
        padding: 14px 14px 12px;
        border-radius: 16px;
    }

    .home-list-card__title {
        font-size: 18px;
    }

    .home-list-card__link {
        width: 100%;
        justify-content: center;
    }

    .home-task-chip {
        padding: 9px 10px;
    }

    .home-task-chip__text {
        font-size: 13px;
    }

    .todo-item-row {
        gap: 10px;
        padding: 16px 12px;
        min-height: 72px;
    }

    .todo-actions {
        padding-left: 0;
    }

    .todo-actions .btn {
        flex: 1 1 0;
        min-width: 74px;
        height: 36px;
        font-size: 13px;
        padding: 0 10px !important;
    }

    .todo-toggle-btn {
        min-width: 84px;
        min-height: 38px;
        font-size: 14px;
    }

    .todo-inline-input {
        font-size: 16px;
    }

    .task-compose-actions .btn-add,
    .task-compose-actions .task-new-list-btn {
        min-width: 0;
    }

    .list-row__link {
        padding: 14px 12px;
    }

    .settings-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .auth-card,
    .register-card,
    .login-card,
    .change-password-card {
        padding: 20px 16px 18px;
    }
}

@media (max-width: 420px) {
    .mobile-sidebar-toggle {
        width: 54px;
        height: 54px;
        border-radius: 16px;
        flex: 0 0 54px;
    }

    .sidebar-left .sidebar {
        width: calc(100vw - 20px);
        left: 10px;
        top: 10px;
        height: calc(100svh - 20px);
        max-height: calc(100svh - 20px);
    }

    .lists-actions {
        flex-direction: column;
    }

    .task-compose {
        gap: 8px;
    }

    .task-compose-actions {
        flex-direction: column;
    }

    .task-compose-actions .btn-add,
    .task-compose-actions .task-new-list-btn {
        width: 100%;
        flex: 1 1 auto;
    }

    .filters {
        gap: 8px;
    }

    .home-lists-head {
        gap: 14px;
    }

    .home-lists-subtitle {
        margin-top: 8px;
        font-size: 13px;
        line-height: 1.45;
    }

    .home-list-card__tasks > :nth-child(n+3) {
        display: none;
    }

    .tab {
        padding: 9px 12px;
        font-size: 13px;
    }

    .todo-item-row {
        padding: 14px 10px;
    }

    .todo-inline-input {
        font-size: 15px;
    }

    .todo-toggle-btn {
        width: 100%;
        min-width: 0;
    }

    .list-modal .modal-content,
    #settingsModal .modal-content {
        border-radius: 16px !important;
    }
}
