:root { --bg-warm: #f8f6f3; --card-shadow: 0 2px 8px rgba(0,0,0,.06); }
body { background: var(--bg-warm); font-family: "Segoe UI", system-ui, sans-serif; min-height: 100vh; }
.todo-home { padding-bottom: 2rem; }
.todo-section { scroll-margin-top: 1rem; margin-bottom: 2rem; }
.todo-section:last-child { margin-bottom: 0; }
.auth-body { min-height: 100vh; background: linear-gradient(135deg, #e8f4fc 0%, #f8f6f3 100%); }
.auth-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.auth-card { background: #fff; border-radius: 12px; box-shadow: var(--card-shadow); padding: 2rem; width: 100%; max-width: 720px; }
.todo-section-header { border-radius: 10px; padding: .5rem .75rem; transition: background-color .2s, color .2s; }
.todo-section-icon { flex-shrink: 0; line-height: 0; }
.todo-add-btn { border: none; background: #0d6efd; color: #fff; width: 2.5rem; height: 2.5rem; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; line-height: 0; box-shadow: var(--card-shadow); }
.todo-add-btn:hover { background: #0b5ed7; color: #fff; }
.todo-card { position: relative; overflow: hidden; background: #fff; border-radius: 10px; margin-bottom: .75rem; box-shadow: var(--card-shadow); border-left: 4px solid #0d6efd; height: 3.5rem; }
.todo-card.priority-high { border-left-color: #dc3545; }
#todoModal .modal-header-high { background: #dc3545; color: #fff; border-bottom-color: #dc3545; }
#todoModal .modal-header-high .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.todo-save-btn { width: 100%; padding: .75rem; font-size: 1.05rem; font-weight: 600; transition: background-color .25s ease, transform .15s ease, box-shadow .25s ease; }
.todo-save-btn:active:not(:disabled) { transform: scale(0.98); }
.todo-save-btn.save-success { background-color: #198754 !important; border-color: #198754 !important; box-shadow: 0 0 0 3px rgba(25, 135, 84, .25); animation: savePulse .45s ease; }
@keyframes savePulse { 0% { transform: scale(1); } 40% { transform: scale(1.02); } 100% { transform: scale(1); } }
.todo-swipe-delete { position: absolute; top: 0; right: 0; bottom: 0; width: 72px; display: flex; align-items: center; justify-content: center; background: #dc3545; color: #fff; z-index: 0; }
.todo-delete-btn { border: none; background: transparent; color: #fff; padding: .5rem; display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 0; }
.todo-delete-btn:active { opacity: .85; }
.todo-swipe-content { position: relative; z-index: 1; width: 100%; height: 100%; background: #fff; padding: 0 1rem 0 1.25rem; border-radius: 10px; touch-action: pan-y; user-select: none; will-change: transform; box-sizing: border-box; cursor: grab; }
.todo-swipe-content.swiping { cursor: grabbing; }
.todo-edit-btn { border: none; background: transparent; font-size: 1.5rem; line-height: 1; padding: 0 .15rem; color: #6c757d; flex-shrink: 0; cursor: pointer; align-self: center; }
.todo-checkbox { flex-shrink: 0; margin: 0; }
.todo-edit-btn:hover { color: #0d6efd; }
.todo-body { cursor: pointer; min-width: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; height: 100%; }
.todo-title { margin: 0; font-size: .95rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-subline { margin: .1rem 0 0; line-height: 1.2; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-due { flex-shrink: 0; white-space: nowrap; line-height: 1; align-self: center; font-variant-numeric: tabular-nums; font-size: .8125rem; }
.navbar-inner { display: flex; align-items: center; width: 100%; }
.navbar-brand { margin-right: 0; padding-top: 0; padding-bottom: 0; }
.navbar-brand-text { display: inline-flex; align-items: flex-end; gap: .4rem; line-height: 1; }
.navbar-brand-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.navbar-brand-family { font-size: .82rem; font-weight: 400; opacity: .78; line-height: 1; padding-bottom: .12rem; letter-spacing: .01em; }
.navbar-logo { flex-shrink: 0; display: block; border-radius: 7px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.nav-settings-btn { color: #fff !important; text-decoration: none; padding: .25rem !important; display: flex; align-items: center; line-height: 0; flex-shrink: 0; }
.nav-settings-btn:hover { color: rgba(255, 255, 255, .85) !important; }
.todo-complete-fx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 1.25rem; pointer-events: none; z-index: 3; opacity: 0; overflow: visible; }
.todo-complete-fx-icon { position: relative; z-index: 2; font-size: 1.75rem; font-weight: 700; color: #198754; transform: scale(0); text-shadow: 0 0 12px rgba(25, 135, 84, .35); }
.todo-complete-fx-ring { position: absolute; right: 1.75rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid rgba(25, 135, 84, .45); background: rgba(25, 135, 84, .12); transform: scale(0); z-index: 1; }
.todo-confetti { position: absolute; right: 2rem; top: 50%; margin-top: -.35rem; border-radius: 1px; opacity: 0; transform: translate(0, 0) rotate(0deg); }
.todo-card.completing { overflow: visible; z-index: 20; }
.todo-card.completing .todo-swipe-delete { display: none !important; }
.todo-card.completing .todo-swipe-content { transform: translateX(0) !important; animation: completeSlideFade .9s ease forwards; }
.todo-card.completing .todo-complete-fx { opacity: 1; }
.todo-card.completing .todo-complete-fx-icon { animation: completeIconPop .75s cubic-bezier(.2, 1.2, .25, 1) forwards; }
.todo-card.completing .todo-complete-fx-ring { animation: completeRingPop .8s ease-out forwards; }
.todo-card.completing .todo-confetti { animation: confettiBurst .85s cubic-bezier(.15, .85, .2, 1) var(--delay) forwards; }
@keyframes completeIconPop { 0% { transform: scale(0) rotate(-24deg); opacity: 0; } 50% { transform: scale(1.25) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes completeRingPop { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes completeSlideFade { 0% { opacity: 1; filter: none; } 100% { opacity: .5; filter: grayscale(.25); } }
@keyframes confettiBurst { 0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(.85); } }
.todo-card.completed .todo-title,
.todo-card.completed .todo-subline,
.todo-card.completed .todo-due { color: #adb5bd !important; }
.todo-card.completed .todo-title { text-decoration: line-through; }
.settings-page { max-width: 960px; margin: 0 auto; }
.settings-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.settings-header h2 { font-size: 1.35rem; margin: 0; }
.settings-logout-form { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #dee2e6; }
.settings-logout-form .btn { min-width: 8rem; }
.settings-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.settings-nav { flex: 0 0 180px; display: flex; flex-direction: column; gap: .25rem; }
.settings-nav-item { display: flex; align-items: center; justify-content: flex-start; gap: .5rem; width: 100%; padding: .65rem 1rem; border: none; border-radius: 8px; background: transparent; color: #495057; text-align: left; cursor: pointer; transition: background .15s; font-size: .95rem; }
.settings-nav-item:hover { background: rgba(13, 110, 253, .08); }
.settings-nav-item.active { background: #fff; color: #0d6efd; box-shadow: var(--card-shadow); font-weight: 600; }
.settings-content { flex: 1; min-width: 0; background: #fff; border-radius: 12px; box-shadow: var(--card-shadow); padding: 1.5rem; }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.settings-panel-title { font-size: 1.1rem; margin-bottom: 1.25rem; }
.settings-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.settings-field { display: flex; flex-direction: column; }
.settings-field .form-control { font-size: 1rem; }
.settings-status { min-height: 1.5rem; margin-top: 1rem; font-size: .875rem; color: #6c757d; }
.settings-status-success { color: #198754; }
.settings-status-error { color: #dc3545; }
@media (max-width: 768px) {
    .settings-page { padding: 0 .15rem; }
    .settings-header { margin-bottom: 1rem; }
    .settings-header h2 { font-size: 1.2rem; }
    .settings-layout { flex-direction: column; gap: .75rem; }
    .settings-nav {
        flex: none;
        flex-direction: row;
        width: 100%;
        padding: .25rem;
        background: #e9ecef;
        border-radius: 10px;
        gap: .25rem;
    }
    .settings-nav-item {
        flex: 1;
        justify-content: center;
        padding: .6rem .5rem;
        border-radius: 8px;
        font-size: .875rem;
        white-space: nowrap;
    }
    .settings-nav-item.active { box-shadow: 0 1px 4px rgba(0,0,0,.1); }
    .settings-content { padding: 1rem; border-radius: 10px; }
    .settings-panel-title { font-size: 1rem; margin-bottom: 1rem; }
    .settings-stack { gap: 1rem; }
    .settings-field .input-group { flex-wrap: wrap; }
    .settings-field .input-group .form-control { min-width: 0; flex: 1 1 8rem; }
    .settings-field .input-group .btn { flex: 0 0 auto; }
    .settings-logout-form .btn { width: 100%; }
}
@media (max-width: 380px) {
    .settings-nav-item { font-size: .8rem; padding: .55rem .35rem; }
    .settings-header .btn { padding: .25rem .5rem; font-size: .8rem; }
}
