/* ==========================================
   KERJAIN - MODERN PRODUCTIVITY UI
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Arial, sans-serif;
    background: #f7f8fc;
    color: #172033;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

/* ==========================================
   APP
========================================== */

.app {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 28px 52px;
}

/* ==========================================
   HEADER
========================================== */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

.brand h1 {
    font-size: 31px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -1.4px;
    color: #111827;
}

.brand h1 span {
    color: #6366f1;
}

.brand p {
    margin-top: 7px;
    color: #7c879d;
    font-size: 12px;
    letter-spacing: 0.15px;
}

/* ==========================================
   NOTIFICATION CARD - MODERN
   ========================================== */

.notification-card {
    width: 410px;
    min-height: 64px;

    display: flex;
    align-items: center;

    gap: 12px;
    padding: 10px 11px;

    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e4e7f0;
    border-radius: 16px;

    box-shadow:
        0 7px 22px rgba(28, 36, 58, 0.055);

    transition:
        transform 0.25s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}


/* Icon */
.notification-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 12px;

    background: #eef0ff;
    color: #6366f1;

    font-size: 18px;

    transform: none;
}


/* Teks */
.notification-copy {
    min-width: 0;
    flex: 1;
}

.notification-copy strong {
    display: block;

    color: #172033;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 750;
}

.notification-copy p {
    margin-top: 4px;

    color: #8b95a9;
    font-size: 9.5px;
    line-height: 1.35;

    max-width: 210px;
}


/* Tombol */
#enableNotificationBtn {
    flex-shrink: 0;

    min-width: 68px;
    height: 34px;

    padding: 0 12px;

    border: 0;
    border-radius: 10px;

    background: #6366f1;
    color: #fff;

    font-size: 10px;
    font-weight: 750;

    box-shadow:
        0 5px 12px rgba(99, 102, 241, 0.18);

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

#enableNotificationBtn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

#enableNotificationBtn:active {
    transform: translateY(0) scale(0.97);
}

.notification-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: #eef0ff;
    color: #6366f1;
    font-size: 20px;
    transform: rotate(180deg);
}

.notification-copy {
    min-width: 0;
    flex: 1;
}

.notification-copy strong {
    display: block;
    color: #172033;
    font-size: 13px;
    font-weight: 750;
}

.notification-copy p {
    margin-top: 3px;
    color: #8b95a9;
    font-size: 10px;
    line-height: 1.45;
}

#enableNotificationBtn {
    flex-shrink: 0;
    border: 0;
    border-radius: 10px;
    padding: 9px 15px;
    background: #6366f1;
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.18);
    transition: 0.2s ease;
}

#enableNotificationBtn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

#enableNotificationBtn:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================
   WELCOME HERO
========================================== */

.welcome-section {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 38px;
    margin-bottom: 16px;
    border-radius: 22px;
    background: linear-gradient(
        120deg,
        #f0f1ff 0%,
        #f8f8ff 62%,
        #eef0ff 100%
    );
    border: 1px solid #e7e8fa;
}

.welcome-copy {
    position: relative;
    z-index: 2;
}

.welcome-section h2 {
    font-size: 25px;
    font-weight: 820;
    letter-spacing: -0.7px;
    color: #172033;
}

.welcome-section p {
    margin-top: 7px;
    color: #68748c;
    font-size: 14px;
}

.welcome-decoration {
    position: relative;
    width: 280px;
    height: 150px;
    flex-shrink: 0;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
}

.decor-circle-one {
    width: 108px;
    height: 108px;
    right: 35px;
    top: 18px;
    background: #e1e3ff;
}

.decor-circle-two {
    width: 55px;
    height: 55px;
    right: 8px;
    bottom: 17px;
    background: #d6e7ff;
}

.decor-clipboard {
    position: absolute;
    right: 80px;
    top: 18px;
    width: 76px;
    height: 108px;
    padding: 29px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 3px solid #6366f1;
    border-radius: 11px;
    background: #fff;
    box-shadow: 8px 10px 0 rgba(99, 102, 241, 0.08);
    transform: rotate(5deg);
}

.decor-clipboard::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 22px;
    width: 29px;
    height: 16px;
    border-radius: 6px;
    background: #8b91b8;
}

.decor-clipboard span {
    height: 14px;
    padding-left: 15px;
    position: relative;
    border-bottom: 2px solid #dfe3f0;
    color: #6366f1;
    font-size: 11px;
    font-weight: 800;
}

.decor-clipboard span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: #e1e4ff;
}

/* ==========================================
   ADD TASK
========================================== */

.todo-input {
    padding: 12px;
    margin-bottom: 17px;
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(24, 32, 52, 0.045);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.todo-input:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08);
}

.todo-input-main input {
    width: 100%;
    height: 47px;
    padding: 0 15px;
    border: 1px solid #e0e4ec;
    border-radius: 12px;
    outline: none;
    background: #fbfcfe;
    color: #172033;
    font-size: 13px;
    transition: 0.2s ease;
}

.todo-input-main input::placeholder,
.search-box input::placeholder {
    color: #a2aabd;
}

.todo-input-main input:focus,
.search-box input:focus,
.todo-input-options select:focus,
.todo-input-options input:focus,
.task-tools select:focus {
    border-color: #aeb3ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
    background: #fff;
}

/* ==========================================
   INPUT OPTIONS
========================================== */

.todo-input-options {
    display: grid;

    /* kategori | prioritas | deadline */
    grid-template-columns: 1fr 1.25fr 120px;

    gap: 10px;
    margin-top: 10px;
}

/* Semua input/select */

.todo-input-options select,
.todo-input-options input[type="datetime-local"] {
    width: 100%;
    height: 45px;
    padding: 0 12px;
    border: 1px solid #e0e4ec;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #465169;
    font-size: 11px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.todo-input-options select:focus,
.todo-input-options input:focus {
    transform: translateY(-1px);
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* ==========================================
   CATEGORY
========================================== */

.category-control {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-control select {
    flex: 1;
    min-width: 0;
}

.add-category-btn {
    width: 45px !important;
    height: 45px !important;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 !important;

    border: 1px solid #e0e4ec !important;
    border-radius: 11px !important;

    background: #eef0ff !important;
    color: #6366f1 !important;

    font-size: 23px !important;
    font-weight: 600 !important;

    box-shadow: none !important;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease !important;
}

.add-category-btn:hover {
    background: #e0e7ff !important;
    color: #4f46e5 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.15) !important;
}

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

.add-category-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   TOMBOL TAMBAH TUGAS
========================================== */

/*
   Tombol dibuat 1 baris penuh.
   Tidak lagi nyempil di samping.
*/

#addTodoBtn {
    grid-column: 1 / -1;

    width: 100%;
    height: 48px;

    margin-top: 2px;

    border: none;
    border-radius: 12px;

    background: #6d5dfc;
    color: #fff;

    font-size: 13px;
    font-weight: 750;

    cursor: pointer;

    box-shadow: 0 7px 17px rgba(91, 92, 232, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        filter 0.25s ease;
}

#addTodoBtn:hover {
    background: #5b4df0;
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.2);
}

#addTodoBtn:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: none;
}

#addTodoBtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   STATISTICS
========================================== */

.todo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 15px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 78px;
    padding: 15px 17px;

    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 16px;

    box-shadow: 0 7px 20px rgba(24, 32, 52, 0.04);
}

.stat-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    border-radius: 13px;
    background: #eef0ff;

    font-size: 18px;

    transition: transform 0.2s ease;
}

.stat-icon svg {
    width: 21px;
    height: 21px;
    display: block;

    fill: none !important;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.total-icon {
    color: #6366f1;
}

.completed-icon {
    background: #dcf8e9;
    color: #10b981;
}

.pending-icon {
    background: #fff0dc;
    color: #f59e0b;
}

.stat-card span {
    display: block;
    margin-bottom: 4px;
    color: #7b879d;
    font-size: 10px;
}

.stat-card strong {
    display: block;
    color: #182034;
    font-size: 21px;
    line-height: 1;
    font-weight: 820;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

/* ==========================================
   PROGRESS
========================================== */

.progress-card {
    padding: 17px 18px;
    margin-bottom: 26px;

    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 16px;

    box-shadow: 0 7px 20px rgba(24, 32, 52, 0.035);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-header h3 {
    color: #253047;
    font-size: 12px;
    font-weight: 750;
}

.progress-header p {
    margin-top: 3px;
    color: #8a95aa;
    font-size: 10px;
}

.progress-header > strong {
    color: #5759e6;
    font-size: 19px;
    font-weight: 820;
}

.progress-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf0f6;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;

    background: linear-gradient(
        90deg,
        #5c5de8,
        #7779f3
    );

    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   TASK HEADER
========================================== */

.todo-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 11px;
}

.todo-header h2 {
    color: #172033;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 820;
    letter-spacing: -0.4px;
}

.todo-header p {
    margin-top: 5px;
    color: #8b95a9;
    font-size: 10px;
}

/* ==========================================
   SEARCH / FILTER
========================================== */

.task-tools {
    display: grid;
    grid-template-columns: 1fr 118px;
    gap: 10px;
    margin-bottom: 13px;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    z-index: 1;

    transform: translateY(-51%);

    color: #8290a8;
    font-size: 18px;
    line-height: 1;

    pointer-events: none;
}

.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 13px 0 34px;

    border: 1px solid #e0e4ec;
    border-radius: 11px;
    outline: none;

    background: #fff;
    color: #172033;
    font-size: 11px;

    transition: 0.2s ease;
}

.task-tools > select {
    width: 100%;
    height: 42px;
    padding: 0 10px;

    border: 1px solid #e0e4ec;
    border-radius: 11px;
    outline: none;

    background: #fff;
    color: #465169;
    font-size: 11px;
}

/* ==========================================
   REMINDERS
========================================== */

.reminder-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 13px;

    animation: reminderBoxIn 0.5s ease both;
}

.reminder-item {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 11px 13px;

    border-radius: 13px;
    border: 1px solid transparent;

    animation: reminderItemIn 0.45s ease both;
}

.reminder-icon {
    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    border-radius: 9px;
    font-size: 13px;
}

.reminder-item strong {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 800;
}

.reminder-item span {
    display: block;
    font-size: 9px;
    font-weight: 500;
}

.reminder-danger {
    background: #fff4f4;
    border-color: #ffcaca;
    color: #df2f35;
}

.reminder-danger .reminder-icon {
    background: #ffe0e0;
}

.reminder-warning {
    background: #fff8ed;
    border-color: #ffe0b2;
    color: #e57a0b;
}

.reminder-warning .reminder-icon {
    background: #ffedcf;
}

.reminder-info {
    background: #f2f5ff;
    border-color: #d7ddff;
    color: #4e58d9;
}

.reminder-info .reminder-icon {
    background: #e1e6ff;
}

@keyframes reminderBoxIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes reminderItemIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reminder-item:nth-child(1) {
    animation-delay: 0.05s;
}

.reminder-item:nth-child(2) {
    animation-delay: 0.12s;
}

.reminder-item:nth-child(3) {
    animation-delay: 0.19s;
}

/* ==========================================
   TASK CARD GRID
========================================== */

.todo-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.todo-item {
    position: relative;

    min-width: 0;
    min-height: 185px;

    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;

    column-gap: 10px;

    padding: 17px;

    background: #fff;
    border: 1px solid #e2e6ee;
    border-radius: 17px;

    box-shadow: 0 7px 20px rgba(24, 32, 52, 0.038);

    will-change: transform;

    animation: taskCardIn 0.45s ease both;

    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease;
}

.todo-item:hover {
    transform: translate3d(0, -4px, 0) scale(1.005);

    box-shadow:
        0 16px 35px rgba(24, 32, 52, 0.09);

    border-color: #dfe3f0;
}

.todo-check {
    grid-column: 1;
    grid-row: 1;
    padding-top: 1px;
}

.check-button {
    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1.5px solid #d4d9e4;
    border-radius: 6px;

    background: #fff;
    color: #fff;

    font-size: 11px;
    font-weight: 850;

    cursor: pointer;

    transition: 0.2s ease;
}

.check-button:hover {
    border-color: #7375ec;
    transform: scale(1.05);
}

.todo-item.completed .check-button {
    background: #10b981;
    border-color: #10b981;
}

.todo-content {
    grid-column: 2;
    grid-row: 1 / span 3;

    min-width: 0;

    display: flex;
    flex-direction: column;

    padding-right: 1px;
}

.todo-title {
    margin: 0 40px 6px 0;

    color: #1c263a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 780;

    word-break: break-word;
}

.todo-content > p {
    margin: 0 0 10px;

    color: #7d889e;
    font-size: 10.5px;
    line-height: 1.5;

    word-break: break-word;
}

.todo-item.completed .todo-title {
    color: #929caf;
    text-decoration: line-through;
}

.todo-item.completed .todo-content > p {
    color: #a5adbc;
}

/* ==========================================
   TODO META
========================================== */

.todo-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

.todo-meta > span {
    display: inline-flex;
    align-items: center;

    min-height: 21px;
    padding: 3px 7px;

    border-radius: 6px;

    background: #f7f8fb;
    color: #69758b;

    font-size: 9px;
    line-height: 1.2;
}

.priority {
    font-weight: 700;
}

.todo-meta .priority.high {
    background: #fff0f0;
    color: #ed3b40;
}

.todo-meta .priority.normal {
    background: #eef0ff;
    color: #5b5de0;
}

.todo-meta .priority.low {
    background: #edf5ff;
    color: #3779dd;
}

.todo-meta .deadline-overdue {
    background: #fff0f0;
    color: #e7353b;
    font-weight: 750;
}

.todo-meta .deadline-today {
    background: #fff5e9;
    color: #e77d16;
    font-weight: 750;
}

.todo-meta .deadline-normal {
    background: #f4f6f9;
    color: #66728a;
}

.todo-meta .deadline-complete {
    background: #e9f9f1;
    color: #10a76e;
    font-weight: 700;
}

/* ==========================================
   CATEGORY CHIP
========================================== */

.category-chip {
    display: inline-flex;
    align-items: center;

    min-height: 21px;
    padding: 3px 8px;

    border-radius: 6px;

    background: #f1efff !important;
    color: #635bdb !important;

    font-size: 9px;
    font-weight: 750;
}

/* ==========================================
   TODO ACTIONS
========================================== */

.todo-actions {
    position: absolute;
    top: 13px;
    right: 13px;

    display: flex;
    gap: 5px;
}

.todo-actions button {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #fff;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.todo-actions button:hover {
    transform: translateY(-2px);
}

.todo-actions button:active {
    transform: translateY(1px) scale(0.95);
}

.edit-button {
    border: 1px solid #e0e4ff;
    color: #6264e9;
}

.edit-button:hover {
    background: #f0f1ff;
    border-color: #cdd1ff;
    box-shadow: 0 5px 12px rgba(99, 102, 241, 0.12);
}

.delete-button {
    border: 1px solid #ffe0e0;
    color: #ef4444;
}

.delete-button:hover {
    background: #fff2f2;
    border-color: #ffcaca;
    box-shadow: 0 5px 12px rgba(239, 68, 68, 0.12);
}

/* ==========================================
   EMPTY STATE
========================================== */

.empty-state {
    grid-column: 1 / -1;

    padding: 52px 20px;

    text-align: center;

    background: #fff;
    border: 1px dashed #d9deea;
    border-radius: 17px;
}

.empty-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 12px;

    border-radius: 14px;

    background: #eef0ff;
    color: #6366f1;

    font-size: 20px;
    font-weight: 850;
}

.empty-state h3 {
    color: #344056;
    font-size: 14px;
    font-weight: 750;
}

.empty-state p {
    margin-top: 5px;
    color: #9aa3b4;
    font-size: 11px;
}

/* ==========================================
   FOOTER
========================================== */

.footer {
    padding-top: 28px;
    text-align: center;
    color: #a0a8b8;
    font-size: 10px;
}

/* ==========================================
   EDIT MODAL
========================================== */

.edit-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
}

.edit-modal {
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 40px);

    overflow-y: auto;

    background: #fff;
    border-radius: 20px;

    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.22);

    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.edit-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;

    padding: 21px;

    border-bottom: 1px solid #eef0f4;
}

.edit-modal-header h2 {
    color: #172033;
    font-size: 18px;
    font-weight: 800;
}

.edit-modal-header p {
    margin-top: 4px;
    color: #7c879a;
    font-size: 11px;
}

.modal-close {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 0;
    border-radius: 9px;

    background: #f3f4f7;
    color: #68748a;

    font-size: 22px;
    cursor: pointer;
}

.modal-close:hover {
    background: #e9ebf0;
    color: #172033;
}

.edit-form {
    display: flex;
    flex-direction: column;
    padding: 21px;
}

.edit-form label {
    margin-bottom: 7px;

    color: #39455b;
    font-size: 11px;
    font-weight: 750;
}

.edit-form input,
.edit-form select,
.edit-form textarea {
    width: 100%;
    margin-bottom: 15px;

    border: 1px solid #e0e4ec;
    border-radius: 10px;
    outline: none;

    background: #fff;
    color: #172033;

    font-size: 12px;

    transition: 0.2s ease;
}

.edit-form input,
.edit-form select {
    height: 44px;
    padding: 0 12px;
}

.edit-form textarea {
    min-height: 100px;
    padding: 11px 12px;
    resize: vertical;
    line-height: 1.5;
}

.edit-form input:focus,
.edit-form select:focus,
.edit-form textarea:focus {
    border-color: #aeb3ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 5px;
}

.cancel-button,
.save-button {
    height: 42px;
    padding: 0 15px;

    border-radius: 10px;

    font-size: 11px;
    font-weight: 750;

    cursor: pointer;
}

.cancel-button {
    border: 1px solid #e0e4ec;
    background: #fff;
    color: #707b8e;
}

.cancel-button:hover {
    background: #f8f9fb;
}

.save-button {
    border: 0;
    background: #5b5ce8;
    color: #fff;
}

.save-button:hover {
    background: #4d4ed4;
    transform: translateY(-1px);
}

/* ==========================================
   ANIMASI CARD
========================================== */

@keyframes taskCardIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.todo-item:nth-child(1) {
    animation-delay: 0.05s;
}

.todo-item:nth-child(2) {
    animation-delay: 0.1s;
}

.todo-item:nth-child(3) {
    animation-delay: 0.15s;
}

.todo-item:nth-child(4) {
    animation-delay: 0.2s;
}

.todo-item:nth-child(5) {
    animation-delay: 0.25s;
}

.todo-item:nth-child(6) {
    animation-delay: 0.3s;
}

.todo-item:nth-child(7) {
    animation-delay: 0.35s;
}

.todo-item:nth-child(8) {
    animation-delay: 0.4s;
}

.todo-item:nth-child(9) {
    animation-delay: 0.45s;
}

.todo-item:nth-child(10) {
    animation-delay: 0.5s;
}

/* ==========================================
   ANIMASI SELESAI
========================================== */

.todo-item.completed {
    animation: completeTask 0.4s ease;
}

@keyframes completeTask {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.todo-item.completed .todo-checkbox {
    animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
    0% {
        transform: scale(0.7);
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.todo-item.completed .todo-title {
    animation: completedTitle 0.35s ease;
}

@keyframes completedTitle {
    0% {
        opacity: 0.6;
        transform: translateX(-4px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   SCROLLBAR
========================================== */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d3d8e3;
    border-radius: 99px;
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 980px) {
    .app {
        max-width: 900px;
    }

    .todo-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .welcome-decoration {
        width: 220px;
    }

    .decor-clipboard {
        right: 60px;
    }
}

@media (max-width: 760px) {
    .app {
        padding: 22px 16px 42px;
    }

    .header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .notification-card {
        width: 100%;
    }

    .welcome-section {
        min-height: 150px;
        padding: 25px;
    }

    .welcome-decoration {
        width: 170px;
        opacity: 0.75;
        transform: scale(0.82);
        transform-origin: right center;
    }

    .todo-input-options {
        grid-template-columns: 1fr 1fr;
    }

    /* Tombol tetap full width */
    #addTodoBtn {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .brand h1 {
        font-size: 28px;
    }

    .notification-card {
        align-items: flex-start;
        padding: 11px;
    }

    .notification-icon {
        width: 34px;
        height: 34px;
    }

    .notification-copy p {
        font-size: 9px;
    }

    #enableNotificationBtn {
        padding: 8px 11px;
        font-size: 10px;
    }

    .welcome-section {
        min-height: 125px;
        padding: 21px;
    }

    .welcome-section h2 {
        font-size: 20px;
    }

    .welcome-section p {
        font-size: 11px;
    }

    .welcome-decoration {
        display: none;
    }

    .todo-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-card {
        min-height: 65px;
    }

    .task-tools {
        grid-template-columns: 1fr;
    }

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

    .todo-item {
        min-height: 160px;
    }

    .footer {
        padding-top: 24px;
    }
}

@media (max-width: 430px) {
    .app {
        padding: 18px 12px 35px;
    }

    .header {
        margin-bottom: 17px;
    }

    .notification-card {
        flex-wrap: wrap;
    }

    .notification-copy {
        flex: 1 1 calc(100% - 52px);
    }

    #enableNotificationBtn {
        width: 100%;
    }

    .todo-input-options {
        grid-template-columns: 1fr;
    }

    #addTodoBtn {
        grid-column: 1;
        width: 100%;
    }

    .todo-item {
        padding: 15px;
    }
}

/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {
    .todo-item,
    .reminder-box,
    .reminder-item {
        animation: none;
        transition: none;
    }
}

/* =========================================
   DESKRIPSI TUGAS
   ========================================= */

#todoDescription {
    width: 100%;
    min-height: 82px;
    margin-top: 10px;
    padding: 13px 15px;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #f9fafb;
    color: #111827;

    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;

    resize: vertical;
    outline: none;

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

#todoDescription::placeholder {
    color: #9ca3af;
}

#todoDescription:hover {
    border-color: #d8d5f5;
}

#todoDescription:focus {
    border-color: #8b7cf6;
    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(109, 93, 252, 0.08);
}

/* =========================================
   CATEGORY CONTROL
   ========================================= */

.category-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.category-control select {
    flex: 1;
}

#addCategoryBtn,
#manageCategoryBtn {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #ffffff;
    color: #6d5dfc;

    font-size: 18px;
    font-weight: 600;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#addCategoryBtn:hover,
#manageCategoryBtn:hover {
    background: #f5f3ff;
    border-color: #d8d5f5;

    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(109, 93, 252, 0.12);
}

#addCategoryBtn:active,
#manageCategoryBtn:active {
    transform: translateY(0);
}

#manageCategoryBtn {
    font-size: 16px;
}

/* =========================================
   KELOLA KATEGORI
   ========================================= */

.category-manager {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    max-height: 380px;
    overflow-y: auto;
}

.category-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 13px 14px;

    border: 1px solid #eeeeee;
    border-radius: 13px;

    background: #fafafa;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}

.category-manager-item:hover {
    background: #ffffff;
    border-color: #ddd9ff;
    transform: translateX(2px);
}

.category-manager-info {
    display: flex;
    align-items: center;
    gap: 11px;

    min-width: 0;
}

.category-manager-info span {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-manager-icon {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #f0edff;
    color: #6d5dfc;

    font-weight: 700;
}

.category-manager-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-edit-btn,
.category-delete-btn {
    width: 34px;
    height: 34px;

    border: none;
    border-radius: 9px;

    background: #ffffff;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.category-edit-btn:hover {
    background: #f0edff;
    transform: translateY(-1px);
}

.category-delete-btn:hover {
    background: #fff1f2;
    transform: translateY(-1px);
}

/* ==========================================
   KERJAIN CUSTOM TOAST
   ========================================== */

.kerjain-toast-container {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 10000;

    display: flex;
    flex-direction: column;
    gap: 10px;

    width: min(360px, calc(100vw - 32px));

    pointer-events: none;
}

.kerjain-toast {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 13px 14px;

    background: #ffffff;

    border: 1px solid #eef0f6;
    border-radius: 14px;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.12);

    transform: translateX(30px);
    opacity: 0;

    pointer-events: auto;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.kerjain-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.kerjain-toast.removing {
    transform: translateX(30px);
    opacity: 0;
}

.kerjain-toast-icon {
    flex-shrink: 0;

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #ecfdf5;
    color: #10b981;

    font-size: 14px;
    font-weight: 800;
}

.kerjain-toast-error .kerjain-toast-icon {
    background: #fef2f2;
    color: #ef4444;
}

.kerjain-toast-warning .kerjain-toast-icon {
    background: #fff7ed;
    color: #f97316;
}

.kerjain-toast-message {
    flex: 1;

    color: #374151;

    font-size: 13px;
    line-height: 1.45;
}

.kerjain-toast-close {
    width: 26px;
    height: 26px;

    flex-shrink: 0;

    border: none;
    border-radius: 7px;

    background: transparent;
    color: #9ca3af;

    font-size: 18px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.kerjain-toast-close:hover {
    background: #f3f4f6;
    color: #374151;
}


/* ==========================================
   CUSTOM CONFIRM MODAL
   ========================================== */

.kerjain-confirm-modal {
    max-width: 430px;
}

.kerjain-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 22px 20px;

    border-top: 1px solid #f1f5f9;
}

.danger-button {
    background: #ef4444 !important;

    box-shadow:
        0 5px 14px rgba(239, 68, 68, 0.20) !important;
}

.danger-button:hover {
    background: #dc2626 !important;

    box-shadow:
        0 7px 18px rgba(239, 68, 68, 0.28) !important;
}


/* ==========================================
   CUSTOM CATEGORY NAME MODAL
   ========================================== */

.category-name-modal {
    max-width: 430px;
}

.category-name-modal input {
    width: 100%;
    box-sizing: border-box;

    padding: 13px 15px;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #f9fafb;
    color: #111827;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.category-name-modal input::placeholder {
    color: #9ca3af;
}

.category-name-modal input:hover {
    border-color: #d8d5f5;
}

.category-name-modal input:focus {
    background: #ffffff;

    border-color: #8b7cf6;

    box-shadow:
        0 0 0 3px rgba(109, 93, 252, 0.09);
}

.category-name-modal input.input-error {
    border-color: #ef4444;

    animation: categoryInputShake 0.25s ease;
}

.category-name-error {
    min-height: 18px;

    margin-top: 7px;

    color: #ef4444;

    font-size: 12px;
}


/* ==========================================
   MODAL ANIMATION
   ========================================== */

.kerjain-modal-closing {
    animation: kerjainOverlayOut 0.15s ease forwards;
}

.kerjain-modal-closing .edit-modal {
    animation: kerjainModalOut 0.15s ease forwards;
}

@keyframes kerjainOverlayOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes kerjainModalOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

@keyframes categoryInputShake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(0);
    }
}


/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 480px) {

    .kerjain-toast-container {
        top: 14px;
        right: 16px;
        left: 16px;

        width: auto;
    }

    .kerjain-confirm-actions {
        padding: 14px 18px 18px;
    }

    .kerjain-confirm-actions button {
        flex: 1;
    }

}

/* ==========================================
   CATEGORY MODAL - SPACING
   ========================================== */

#categoryModal .edit-modal {
    overflow: hidden;
}

#categoryModal .category-manager {
    padding: 4px 0 16px;
}

#categoryModal .category-manager-item {
    margin: 0 0 6px;
}

/* FOOTER MODAL */
#categoryModal .edit-modal-actions {
    margin-top: 0;

    padding: 18px 22px 22px;

    border-top: 1px solid #eef0f5;

    background: #ffffff;

    display: flex;
    justify-content: flex-end;
    align-items: center;

    gap: 10px;
}

/* BUTTON */
#categoryModal .edit-modal-actions button {
    min-height: 38px;
    padding: 9px 16px;

    border-radius: 10px;
}

/* TUTUP */
#categoryModal .cancel-button {
    background: #ffffff;
    border: 1px solid #dfe3eb;
}

/* TAMBAH KATEGORI */
#categoryModal .save-button {
    border: none;
}

/* =========================================
   DARK MODE - KERJAIN
   ========================================= */

/* Smooth transition */
body,
.app,
.header,
.notification-card,
.welcome-section,
.todo-input,
.stat-card,
.progress-card,
.search-box,
.task-tools select,
.todo-card,
.reminder-box,
.empty-state,
.footer,
input,
textarea,
select,
button {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================
   HEADER ACTIONS
   ========================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* =========================================
   THEME TOGGLE
   ========================================= */

.theme-toggle {
    width: 46px;
    height: 46px;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    background: #ffffff;
    color: #374151;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    cursor: pointer;

    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);

    transition:
        transform 0.25s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.theme-toggle:active {
    transform: scale(0.94);
}


/* =========================================
   BODY
   ========================================= */

body.dark-mode {
    background: #0f1117;
    color: #e5e7eb;
}


/* =========================================
   MAIN APP
   ========================================= */

body.dark-mode .app {
    color: #e5e7eb;
}


/* =========================================
   HEADER
   ========================================= */

body.dark-mode .header {
    color: #f9fafb;
}

body.dark-mode .brand h1 {
    color: #f9fafb;
}

body.dark-mode .brand p {
    color: #9ca3af;
}


/* =========================================
   THEME BUTTON
   ========================================= */

body.dark-mode .theme-toggle {
    background: #1a1d25;
    border-color: #2a2e38;
    color: #f9fafb;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.25);
}

body.dark-mode .theme-toggle:hover {
    background: #222631;
    border-color: #383e4c;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3);
}


/* =========================================
   NOTIFICATION CARD
   ========================================= */

/* ==========================================
   NOTIFICATION CARD - DARK MODE
   ========================================== */

body.dark-mode .notification-card {
    background: #181b23;
    border-color: #292d37;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.24);
}

body.dark-mode .notification-icon {
    background: #25243a;
    color: #aaa6f0;
}

body.dark-mode .notification-copy strong {
    color: #f1f2f5;
}

body.dark-mode .notification-copy p {
    color: #858d9e;
}

body.dark-mode #enableNotificationBtn {
    background: #4f46a8;
    color: #e9e7ff;

    box-shadow:
        0 5px 13px rgba(79, 70, 168, 0.18);
}

body.dark-mode #enableNotificationBtn:hover {
    background: #5b52bd;
}
body.dark-mode .notification-copy strong {
    color: #f3f4f6;
}

body.dark-mode .notification-copy p {
    color: #9ca3af;
}


/* =========================================
   WELCOME SECTION
   ========================================= */

body.dark-mode .welcome-section {
    background:
        linear-gradient(
            135deg,
            #29234a 0%,
            #211f38 100%
        );

    border-color: #393253;
}

body.dark-mode .welcome-copy h2 {
    color: #f9fafb;
}

body.dark-mode .welcome-copy p {
    color: #b8b5c9;
}


/* =========================================
   INPUT TUGAS
   ========================================= */

body.dark-mode .todo-input {
    background: #181b23;
    border-color: #292d37;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);
}


/* INPUT / TEXTAREA / SELECT */

body.dark-mode #todoInput,
body.dark-mode #todoDescription,
body.dark-mode #todoCategory,
body.dark-mode #todoPriority,
body.dark-mode #todoDueDate,
body.dark-mode .todo-input select,
body.dark-mode .todo-input input,
body.dark-mode .todo-input textarea {
    background: #11141b;
    color: #f3f4f6;
    border-color: #303540;
}


/* Placeholder */

body.dark-mode #todoInput::placeholder,
body.dark-mode #todoDescription::placeholder {
    color: #6b7280;
}


/* Focus */

body.dark-mode #todoInput:focus,
body.dark-mode #todoDescription:focus,
body.dark-mode #todoCategory:focus,
body.dark-mode #todoPriority:focus,
body.dark-mode #todoDueDate:focus {
    background: #151821;
    border-color: #8b7cf6;

    box-shadow:
        0 0 0 3px rgba(139, 124, 246, 0.12);
}


/* Dropdown option */

body.dark-mode select option {
    background: #181b23;
    color: #f3f4f6;
}


/* =========================================
   CATEGORY CONTROL
   ========================================= */

body.dark-mode .category-control button {
    background: #222631;
    border-color: #303540;
    color: #c4b5fd;
}

body.dark-mode .category-control button:hover {
    background: #2b3040;
}


/* =========================================
   STATISTICS
   ========================================= */

body.dark-mode .stat-card {
    background: #181b23;
    border-color: #292d37;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);
}

body.dark-mode .stat-card span {
    color: #9ca3af;
}

body.dark-mode .stat-card strong {
    color: #f9fafb;
}


/* =========================================
   PROGRESS
   ========================================= */

body.dark-mode .progress-card {
    background: #181b23;
    border-color: #292d37;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);
}

body.dark-mode .progress-header h3 {
    color: #f9fafb;
}

body.dark-mode .progress-header p {
    color: #9ca3af;
}

body.dark-mode .progress-header strong {
    color: #c4b5fd;
}

body.dark-mode .progress-bar {
    background: #292d37;
}


/* =========================================
   TODO HEADER
   ========================================= */

body.dark-mode .todo-header h2 {
    color: #f9fafb;
}

body.dark-mode .todo-header p {
    color: #9ca3af;
}


/* =========================================
   SEARCH
   ========================================= */

body.dark-mode .search-box {
    background: #181b23;
    border-color: #303540;
}

body.dark-mode .search-box input {
    background: transparent;
    color: #f3f4f6;
}

body.dark-mode .search-box input::placeholder {
    color: #6b7280;
}

body.dark-mode .search-icon {
    color: #8b93a3;
}


/* =========================================
   FILTER
   ========================================= */

body.dark-mode .task-tools select {
    background: #181b23;
    border-color: #303540;
    color: #e5e7eb;
}


/* =========================================
   REMINDER
   ========================================= */

body.dark-mode .reminder-box {
    color: #e5e7eb;
}


/* Reminder umum */

body.dark-mode .reminder-item {
    background: #181b23;
    border-color: #292d37;
}


/* =========================================
   TODO CARD
   ========================================= */

body.dark-mode .todo-card {
    background: #181b23;
    border-color: #292d37;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.18);
}

body.dark-mode .todo-card:hover {
    background: #1c2029;
    border-color: #383e4c;

    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.28);
}


/* Judul tugas */

body.dark-mode .todo-card h3,
body.dark-mode .todo-title {
    color: #f9fafb;
}


/* Deskripsi */

body.dark-mode .todo-card p,
body.dark-mode .todo-description {
    color: #9ca3af;
}


/* Status */

body.dark-mode .todo-status {
    color: #9ca3af;
}


/* Deadline */

body.dark-mode .todo-deadline {
    color: #9ca3af;
}


/* =========================================
   TODO CHECKBOX
   ========================================= */

body.dark-mode .todo-checkbox {
    border-color: #4b5563;
    background: #11141b;
}

body.dark-mode .todo-checkbox:hover {
    border-color: #8b7cf6;
}


/* =========================================
   TODO CARD BUTTON
   ========================================= */

body.dark-mode .todo-card button {
    background: #222631;
    border-color: #303540;
    color: #cbd5e1;
}

body.dark-mode .todo-card button:hover {
    background: #2b3040;
    color: #ffffff;
}


/* =========================================
   EMPTY STATE
   ========================================= */

body.dark-mode .empty-state {
    background: #181b23;
    border-color: #292d37;
}

body.dark-mode .empty-state h3 {
    color: #f9fafb;
}

body.dark-mode .empty-state p {
    color: #9ca3af;
}


/* =========================================
   FOOTER
   ========================================= */

body.dark-mode .footer {
    color: #6b7280;
    border-top-color: #292d37;
}


/* =========================================
   CATEGORY MODAL
   ========================================= */

body.dark-mode .category-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .category-modal {
    background: #181b23;
    border-color: #292d37;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.5);
}

body.dark-mode .category-modal h3 {
    color: #f9fafb;
}

body.dark-mode .category-modal p {
    color: #9ca3af;
}

body.dark-mode .category-modal input {
    background: #11141b;
    color: #f3f4f6;
    border-color: #303540;
}

body.dark-mode .category-modal input::placeholder {
    color: #6b7280;
}


/* =========================================
   CUSTOM MODAL
   ========================================= */

body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .modal-content {
    background: #181b23;
    border-color: #292d37;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.5);
}

body.dark-mode .modal-content h3 {
    color: #f9fafb;
}

body.dark-mode .modal-content p {
    color: #9ca3af;
}

body.dark-mode .modal-content input,
body.dark-mode .modal-content textarea,
body.dark-mode .modal-content select {
    background: #11141b;
    color: #f3f4f6;
    border-color: #303540;
}

body.dark-mode .modal-content input::placeholder,
body.dark-mode .modal-content textarea::placeholder {
    color: #6b7280;
}


/* =========================================
   CATEGORY LIST
   ========================================= */

body.dark-mode .category-list {
    color: #e5e7eb;
}

body.dark-mode .category-item {
    background: #11141b;
    border-color: #292d37;
}

body.dark-mode .category-item:hover {
    background: #1d212a;
}

body.dark-mode .category-item strong {
    color: #f3f4f6;
}


/* =========================================
   TOAST
   ========================================= */

body.dark-mode .toast {
    background: #f9fafb;
    color: #111827;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.4);
}


/* =========================================
   MOBILE DARK MODE
   ========================================= */

@media (max-width: 768px) {

    body.dark-mode .header-actions {
        width: 100%;
    }

    body.dark-mode .notification-card {
        flex: 1;
    }

    body.dark-mode .theme-toggle {
        flex-shrink: 0;
    }

}

/* =========================================
   KERJAIN - DARK MODE FIX FINAL
   ========================================= */

/* -----------------------------------------
   TASK CARD
   ----------------------------------------- */

body.dark-mode .todo-item {
    background: #181b23;
    border-color: #292d37;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20);
}

body.dark-mode .todo-item:hover {
    background: #1c2029;
    border-color: #383e4c;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.30);
}


/* Judul tugas */
body.dark-mode .todo-title {
    color: #f3f4f6;
}

/* Deskripsi */
body.dark-mode .todo-content > p {
    color: #929aaa;
}

/* Tugas selesai */
body.dark-mode .todo-item.completed .todo-title {
    color: #737b8c;
}

body.dark-mode .todo-item.completed .todo-content > p {
    color: #697180;
}


/* -----------------------------------------
   CHECKBOX
   ----------------------------------------- */

body.dark-mode .check-button {
    background: #11141b;
    border-color: #454b59;
    color: #ffffff;
}

body.dark-mode .check-button:hover {
    border-color: #8b7cf6;
    background: #1d202a;
}

body.dark-mode .todo-item.completed .check-button {
    background: #10b981;
    border-color: #10b981;
}


/* -----------------------------------------
   META DEFAULT
   ----------------------------------------- */

body.dark-mode .todo-meta > span {
    background: #222631;
    color: #aeb6c5;
}


/* -----------------------------------------
   PRIORITY
   ----------------------------------------- */

/* Tinggi */
body.dark-mode .todo-meta .priority.high {
    background: #302226;
    color: #e99aa2;
}

/* Normal */
body.dark-mode .todo-meta .priority.normal {
    background: #25243a;
    color: #aaa6e8;
}

/* Rendah */
body.dark-mode .todo-meta .priority.low {
    background: #202b3b;
    color: #8fb3df;
}


/* -----------------------------------------
   DEADLINE BADGE DI TASK CARD
   ----------------------------------------- */

/* Terlambat */
body.dark-mode .todo-meta .deadline-overdue {
    background: #302226;
    color: #e89aa1;
}

/* Hari ini */
body.dark-mode .todo-meta .deadline-today {
    background: #302b20;
    color: #dfbd7b;
}

/* Deadline normal */
body.dark-mode .todo-meta .deadline-normal {
    background: #222631;
    color: #9da6b7;
}

/* Tugas selesai */
body.dark-mode .todo-meta .deadline-complete {
    background: #203028;
    color: #7bc6a2;
}


/* -----------------------------------------
   CATEGORY CHIP
   ----------------------------------------- */

body.dark-mode .category-chip {
    background: #292541 !important;
    color: #b7b0f2 !important;
}


/* -----------------------------------------
   STATUS BADGE
   ----------------------------------------- */

body.dark-mode .todo-meta > span:not(
    .priority,
    .category-chip,
    .deadline-overdue,
    .deadline-today,
    .deadline-normal,
    .deadline-complete
) {
    background: #222631;
    color: #8f98a8;
}


/* -----------------------------------------
   EDIT & DELETE BUTTON
   ----------------------------------------- */

body.dark-mode .todo-actions button {
    background: #20242d;
    border-color: #343a46;
}

body.dark-mode .edit-button {
    color: #aaa8f5;
    border-color: #373753;
}

body.dark-mode .edit-button:hover {
    background: #292842;
    border-color: #4a4770;
}

body.dark-mode .delete-button {
    color: #e58d96;
    border-color: #493036;
}

body.dark-mode .delete-button:hover {
    background: #302226;
    border-color: #5a3940;
}


/* =========================================
   DEADLINE REMINDER CARD
   ========================================= */

/* Umum */
body.dark-mode .reminder-item {
    border-width: 1px;
    box-shadow: none;
}


/* 🔴 TERLAMBAT */
body.dark-mode .reminder-danger {
    background: #241b1f;
    border-color: #3b292f;
    color: #d9949d;
}

body.dark-mode .reminder-danger .reminder-icon {
    background: #302126;
    color: #dc929c;
}

body.dark-mode .reminder-danger strong {
    color: #e3a0a8;
}

body.dark-mode .reminder-danger span {
    color: #9e777e;
}


/* 🟡 HARI INI */
body.dark-mode .reminder-warning {
    background: #272218;
    border-color: #3b3322;
    color: #d2b77b;
}

body.dark-mode .reminder-warning .reminder-icon {
    background: #322a1c;
    color: #d5b66b;
}

body.dark-mode .reminder-warning strong {
    color: #dfc486;
}

body.dark-mode .reminder-warning span {
    color: #9f8d68;
}


/* 🔵 BESOK / INFO */
body.dark-mode .reminder-info {
    background: #1e2130;
    border-color: #30344a;
    color: #9fa6d5;
}

body.dark-mode .reminder-info .reminder-icon {
    background: #282c42;
    color: #a7acf0;
}

body.dark-mode .reminder-info strong {
    color: #b4b8ed;
}

body.dark-mode .reminder-info span {
    color: #8087a8;
}


/* =========================================
   NOTIFICATION CARD
   ========================================= */

body.dark-mode .notification-card {
    background: #181b23;
    border-color: #292d37;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

body.dark-mode .notification-icon {
    background: #25233a;
    color: #aaa6f0;
}

body.dark-mode .notification-copy strong {
    color: #f0f1f4;
}

body.dark-mode .notification-copy p {
    color: #858d9e;
}


/* Tombol Aktifkan */
body.dark-mode #enableNotificationBtn {
    background: #4f46a8;
    color: #e9e7ff;
    box-shadow: 0 5px 14px rgba(79, 70, 168, 0.18);
}

body.dark-mode #enableNotificationBtn:hover {
    background: #5b52bd;
}


/* =========================================
   SEARCH & FILTER
   ========================================= */

body.dark-mode .search-box input {
    background: #181b23;
    border-color: #303540;
    color: #e5e7eb;
}

body.dark-mode .task-tools > select {
    background: #181b23;
    border-color: #303540;
    color: #d7dbe3;
}

body.dark-mode .search-box input::placeholder {
    color: #687180;
}


/* =========================================
   EMPTY STATE
   ========================================= */

body.dark-mode .empty-state {
    background: #181b23;
    border-color: #303540;
}

body.dark-mode .empty-icon {
    background: #25233a;
    color: #aaa6f0;
}

body.dark-mode .empty-state h3 {
    color: #f0f1f4;
}

body.dark-mode .empty-state p {
    color: #7f8796;
}


/* =========================================
   SCROLLBAR
   ========================================= */

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #353a46;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #454b59;
}

/* ==========================================
   KELOLA KATEGORI - DARK MODE FIX
   ========================================== */

/* Modal utama */
body.dark-mode #categoryModal .edit-modal {
    background: #181b23;
    border: 1px solid #292d37;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}


/* Header modal */
body.dark-mode #categoryModal .edit-modal-header {
    background: #181b23;
    border-bottom-color: #292d37;
}

body.dark-mode #categoryModal .edit-modal-header h2 {
    color: #f3f4f6;
}

body.dark-mode #categoryModal .edit-modal-header p {
    color: #858d9e;
}


/* Tombol X */
body.dark-mode #categoryModal .modal-close {
    background: #222631;
    color: #9ca3af;
}

body.dark-mode #categoryModal .modal-close:hover {
    background: #2b3040;
    color: #f3f4f6;
}


/* ==========================================
   LIST KATEGORI
   ========================================== */

body.dark-mode #categoryModal .category-manager {
    background: #181b23;
}


/* Item kategori */
body.dark-mode #categoryModal .category-manager-item {
    background: #20242d;
    border-color: #303540;

    box-shadow: none;
}

body.dark-mode #categoryModal .category-manager-item:hover {
    background: #252a34;
    border-color: #3b4050;
    transform: translateX(2px);
}


/* Icon kategori */
body.dark-mode #categoryModal .category-manager-icon {
    background: #292641;
    color: #aaa6f0;
}


/* Nama kategori */
body.dark-mode #categoryModal .category-manager-info span {
    color: #e5e7eb;
}


/* ==========================================
   TOMBOL EDIT & HAPUS
   ========================================== */

body.dark-mode #categoryModal .category-edit-btn,
body.dark-mode #categoryModal .category-delete-btn {
    background: #292d37;
    border: 1px solid #373d49;
}


/* Edit */
body.dark-mode #categoryModal .category-edit-btn {
    color: #aaa6f0;
}

body.dark-mode #categoryModal .category-edit-btn:hover {
    background: #302e48;
    border-color: #48446b;
}


/* Hapus */
body.dark-mode #categoryModal .category-delete-btn {
    color: #e58d96;
}

body.dark-mode #categoryModal .category-delete-btn:hover {
    background: #33252a;
    border-color: #52353c;
}


/* ==========================================
   FOOTER MODAL
   ========================================== */

body.dark-mode #categoryModal .edit-modal-actions {
    background: #181b23;
    border-top-color: #292d37;
}


/* Tombol Tutup */
body.dark-mode #categoryModal .cancel-button {
    background: #222631;
    border-color: #343a46;
    color: #aeb6c5;
}

body.dark-mode #categoryModal .cancel-button:hover {
    background: #2b3040;
    color: #f3f4f6;
}


/* Tombol Tambah Kategori */
body.dark-mode #categoryModal .save-button {
    background: #5b5ce8;
    color: #ffffff;
}

body.dark-mode #categoryModal .save-button:hover {
    background: #4d4ed4;
}


/* ==========================================
   SCROLLBAR KATEGORI
   ========================================== */

body.dark-mode #categoryModal .category-manager::-webkit-scrollbar {
    width: 6px;
}

body.dark-mode #categoryModal .category-manager::-webkit-scrollbar-thumb {
    background: #383e4b;
    border-radius: 99px;
}

body.dark-mode #categoryModal .category-manager::-webkit-scrollbar-thumb:hover {
    background: #4a5160;
}

/* ==========================================
   KELOLA KATEGORI BUTTON - FINAL
   ========================================== */

#manageCategoryBtn {
    width: 45px !important;
    height: 45px !important;
    flex: 0 0 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 !important;

    border: 1px solid #e0e4ec !important;
    border-radius: 11px !important;

    background: #ffffff !important;
    color: #6366f1 !important;

    font-size: 0 !important;

    box-shadow: none !important;

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

/* Icon */
#manageCategoryBtn svg {
    width: 19px;
    height: 19px;

    display: block;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        transform 0.35s ease,
        color 0.25s ease;
}

/* Hover */
#manageCategoryBtn:hover {
    background: #f5f3ff !important;
    border-color: #d4d0ff !important;

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(99, 102, 241, 0.12) !important;
}

#manageCategoryBtn:hover svg {
    transform: rotate(30deg);
}

/* Active */
#manageCategoryBtn:active {
    transform: translateY(0) scale(0.97);
}


/* ==========================================
   DARK MODE
   ========================================== */

body.dark-mode #manageCategoryBtn {
    background: #222631 !important;
    border-color: #343946 !important;
    color: #aaa6f0 !important;

    box-shadow: none !important;
}

body.dark-mode #manageCategoryBtn:hover {
    background: #2b3040 !important;
    border-color: #454b5d !important;

    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.25) !important;
}

body.dark-mode #manageCategoryBtn svg {
    color: #aaa6f0;
}

/* ==========================================
   MOBILE UI - KERJAIN
   Optimasi tampilan HP
   ========================================== */

@media (max-width: 600px) {

    /* ==============================
       APP
       ============================== */

    .app {
        width: 100%;
        padding: 16px 12px 32px;
    }


    /* ==============================
       HEADER
       ============================== */

    .header {
        gap: 12px;
        margin-bottom: 16px;
    }

    .brand h1 {
        font-size: 27px;
        letter-spacing: -1px;
    }

    .brand p {
        margin-top: 5px;
        font-size: 10px;
    }

    .header-actions {
        width: 100%;
        gap: 8px;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        border-radius: 12px;
        font-size: 16px;
    }


    /* ==============================
       NOTIFICATION
       ============================== */

    .notification-card {
        width: 100%;
        min-width: 0;
        padding: 10px;
        gap: 9px;
        border-radius: 14px;
    }

    .notification-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 17px;
    }

    .notification-copy strong {
        font-size: 11px;
    }

    .notification-copy p {
        margin-top: 2px;
        font-size: 8.5px;
        line-height: 1.4;
    }

    #enableNotificationBtn {
        padding: 8px 10px;
        border-radius: 9px;
        font-size: 9px;
        white-space: nowrap;
    }


    /* ==============================
       WELCOME
       ============================== */

    .welcome-section {
        min-height: 125px;
        padding: 21px;
        margin-bottom: 12px;
        border-radius: 17px;
    }

    .welcome-section h2 {
        font-size: 20px;
        letter-spacing: -0.4px;
    }

    .welcome-section p {
        margin-top: 5px;
        font-size: 10.5px;
    }

    .welcome-decoration {
        display: none;
    }


    /* ==============================
       INPUT TUGAS
       ============================== */

    .todo-input {
        padding: 10px;
        margin-bottom: 13px;
        border-radius: 15px;
    }

    .todo-input-main input {
        height: 44px;
        padding: 0 13px;
        border-radius: 10px;
        font-size: 12px;
    }

    #todoDescription {
        min-height: 75px;
        margin-top: 8px;
        padding: 11px 13px;
        border-radius: 10px;
        font-size: 11px;
    }


    /* ==============================
       INPUT OPTIONS
       ============================== */

    .todo-input-options {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 8px;
    }

    .todo-input-options select,
    .todo-input-options input[type="datetime-local"] {
        height: 43px;
        padding: 0 11px;
        border-radius: 10px;
        font-size: 10.5px;
    }


    /* ==============================
       CATEGORY
       ============================== */

    .category-control {
        gap: 7px;
    }

    .category-control select {
        height: 43px;
    }

    #manageCategoryBtn,
    #addCategoryBtn {
        width: 43px;
        height: 43px;
        border-radius: 10px;
        font-size: 16px;
    }


    /* ==============================
       BUTTON TAMBAH
       ============================== */

    #addTodoBtn {
        grid-column: 1;
        width: 100%;
        height: 45px;
        margin-top: 1px;
        border-radius: 10px;
        font-size: 11px;
    }


    /* ==============================
       STATISTIK
       ============================== */

    .todo-stats {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-bottom: 12px;
    }

    .stat-card {
        min-height: 61px;
        padding: 11px 13px;
        border-radius: 13px;
        gap: 11px;
    }

    .stat-icon {
        width: 37px;
        height: 37px;
        border-radius: 11px;
    }

    .stat-icon svg {
        width: 19px;
        height: 19px;
    }

    .stat-card span {
        margin-bottom: 3px;
        font-size: 9px;
    }

    .stat-card strong {
        font-size: 18px;
    }


    /* ==============================
       PROGRESS
       ============================== */

    .progress-card {
        padding: 14px;
        margin-bottom: 20px;
        border-radius: 13px;
    }

    .progress-header {
        margin-bottom: 8px;
    }

    .progress-header h3 {
        font-size: 11px;
    }

    .progress-header p {
        font-size: 9px;
    }

    .progress-header > strong {
        font-size: 17px;
    }

    .progress-bar {
        height: 6px;
    }


    /* ==============================
       HEADER TUGAS
       ============================== */

    .todo-header {
        margin-bottom: 9px;
    }

    .todo-header h2 {
        font-size: 18px;
    }

    .todo-header p {
        margin-top: 4px;
        font-size: 9px;
    }


    /* ==============================
       SEARCH
       ============================== */

    .task-tools {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-bottom: 10px;
    }

    .search-box input {
        height: 40px;
        padding-left: 33px;
        border-radius: 10px;
        font-size: 10.5px;
    }

    .search-icon {
        left: 12px;
        font-size: 16px;
    }

    .task-tools > select {
        height: 40px;
        border-radius: 10px;
        font-size: 10.5px;
    }


    /* ==============================
       REMINDER
       ============================== */

    .reminder-box {
        gap: 6px;
        margin-bottom: 10px;
    }

    .reminder-item {
        gap: 9px;
        padding: 9px 10px;
        border-radius: 11px;
    }

    .reminder-icon {
        width: 29px;
        height: 29px;
        border-radius: 8px;
        font-size: 12px;
    }

    .reminder-item strong {
        margin-bottom: 1px;
        font-size: 10px;
    }

    .reminder-item span {
        font-size: 8px;
        line-height: 1.4;
    }


    /* ==============================
       TODO LIST
       ============================== */

    .todo-list {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .todo-item {
        min-height: 0;
        padding: 14px;
        border-radius: 14px;
        grid-template-columns: 21px minmax(0, 1fr);
        column-gap: 9px;
    }


    /* ==============================
       CHECKBOX
       ============================== */

    .check-button {
        width: 19px;
        height: 19px;
        border-radius: 6px;
        font-size: 10px;
    }


    /* ==============================
       TASK CONTENT
       ============================== */

    .todo-title {
        margin-right: 62px;
        margin-bottom: 5px;
        font-size: 12px;
        line-height: 1.45;
    }

    .todo-content > p {
        margin-bottom: 8px;
        font-size: 9.5px;
        line-height: 1.5;
    }


    /* ==============================
       TASK META
       ============================== */

    .todo-meta {
        gap: 4px;
    }

    .todo-meta > span,
    .category-chip {
        min-height: 20px;
        padding: 3px 6px;
        border-radius: 6px;
        font-size: 8px;
    }


    /* ==============================
       ACTION BUTTON
       ============================== */

    .todo-actions {
        top: 10px;
        right: 10px;
        gap: 4px;
    }

    .todo-actions button {
        width: 27px;
        height: 27px;
        border-radius: 8px;
        font-size: 11px;
    }


    /* ==============================
       EMPTY STATE
       ============================== */

    .empty-state {
        padding: 42px 15px;
        border-radius: 14px;
    }

    .empty-icon {
        width: 43px;
        height: 43px;
        margin-bottom: 10px;
        border-radius: 12px;
        font-size: 18px;
    }

    .empty-state h3 {
        font-size: 13px;
    }

    .empty-state p {
        font-size: 10px;
    }


    /* ==============================
       FOOTER
       ============================== */

    .footer {
        padding-top: 21px;
        font-size: 9px;
    }
}


/* ==========================================
   EXTRA SMALL PHONE
   430px KE BAWAH
   ========================================== */

@media (max-width: 430px) {

    .app {
        padding: 14px 10px 28px;
    }

    /* HEADER */

    .header-actions {
        align-items: stretch;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .notification-card {
        padding: 9px;
        border-radius: 13px;
    }

    .notification-icon {
        width: 32px;
        height: 32px;
    }

    .notification-copy {
        min-width: 0;
    }

    .notification-copy strong {
        font-size: 10px;
    }

    .notification-copy p {
        font-size: 8px;
    }

    #enableNotificationBtn {
        padding: 7px 9px;
        font-size: 8.5px;
    }


    /* WELCOME */

    .welcome-section {
        min-height: 115px;
        padding: 18px;
        border-radius: 15px;
    }

    .welcome-section h2 {
        font-size: 18px;
    }

    .welcome-section p {
        font-size: 10px;
    }


    /* INPUT */

    .todo-input {
        padding: 9px;
        border-radius: 14px;
    }

    .todo-input-main input {
        height: 42px;
        font-size: 11px;
    }

    #todoDescription {
        min-height: 70px;
        font-size: 10.5px;
    }


    /* STAT */

    .stat-card {
        min-height: 58px;
        padding: 10px 11px;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
    }

    .stat-card strong {
        font-size: 17px;
    }


    /* PROGRESS */

    .progress-card {
        padding: 13px;
        margin-bottom: 18px;
    }


    /* TASK */

    .todo-item {
        padding: 13px;
        border-radius: 13px;
    }

    .todo-title {
        margin-right: 58px;
        font-size: 11.5px;
    }

    .todo-content > p {
        font-size: 9px;
    }

    .todo-actions {
        top: 9px;
        right: 9px;
    }

    .todo-actions button {
        width: 26px;
        height: 26px;
    }


    /* REMINDER */

    .reminder-item {
        padding: 8px 9px;
    }

    .reminder-item strong {
        font-size: 9.5px;
    }

    .reminder-item span {
        font-size: 7.8px;
    }
}


/* ==========================================
   CATEGORY MODAL - MOBILE
   ========================================== */

@media (max-width: 600px) {

    .edit-modal-overlay {
        padding: 12px;
        align-items: center;
    }

    .edit-modal {
        max-height: calc(100vh - 24px);
        border-radius: 17px;
    }

    .edit-modal-header {
        padding: 16px;
    }

    .edit-modal-header h2 {
        font-size: 16px;
    }

    .edit-modal-header p {
        font-size: 9px;
    }

    .modal-close {
        width: 31px;
        height: 31px;
        font-size: 19px;
        border-radius: 8px;
    }

    .edit-form {
        padding: 16px;
    }

    .edit-form label {
        font-size: 10px;
    }

    .edit-form input,
    .edit-form select {
        height: 41px;
        margin-bottom: 12px;
        font-size: 11px;
    }

    .edit-form textarea {
        min-height: 85px;
        margin-bottom: 12px;
        font-size: 11px;
    }


    /* CATEGORY LIST */

    .category-manager {
        max-height: 300px;
        gap: 7px;
    }

    .category-manager-item {
        padding: 10px 11px;
        border-radius: 11px;
    }

    .category-manager-info {
        gap: 8px;
    }

    .category-manager-icon {
        width: 31px;
        height: 31px;
        border-radius: 9px;
        font-size: 12px;
    }

    .category-manager-info span {
        font-size: 12px;
    }

    .category-manager-actions {
        gap: 4px;
    }

    .category-edit-btn,
    .category-delete-btn {
        width: 31px;
        height: 31px;
        border-radius: 8px;
        font-size: 12px;
    }


    /* FOOTER MODAL */

    #categoryModal .edit-modal-actions {
        padding: 13px 16px 16px;
        gap: 7px;
    }

    #categoryModal .edit-modal-actions button {
        min-height: 37px;
        padding: 8px 13px;
        font-size: 10px;
    }
}


/* ==========================================
   DARK MODE MOBILE
   ========================================== */

@media (max-width: 600px) {

    body.dark-mode .todo-item {
        background: #181b23;
        border-color: #292d37;
    }

    body.dark-mode .todo-item:hover {
        background: #1c2029;
        border-color: #383e4c;
    }

    body.dark-mode .stat-card,
    body.dark-mode .progress-card,
    body.dark-mode .todo-input,
    body.dark-mode .notification-card {
        box-shadow:
            0 7px 20px rgba(0, 0, 0, 0.22);
    }

    body.dark-mode .category-manager-item {
        background: #11141b;
        border-color: #292d37;
    }

    body.dark-mode #categoryModal .edit-modal-actions {
        background: #181b23;
        border-color: #292d37;
    }
}


/* ==========================================
   MOBILE TOUCH
   ========================================== */

@media (hover: none) and (pointer: coarse) {

    .todo-item:hover {
        transform: none;
    }

    .stat-card:hover .stat-icon {
        transform: none;
    }

    .todo-actions button:hover {
        transform: none;
    }

    .theme-toggle:hover {
        transform: none;
    }

    #addTodoBtn:hover {
        transform: none;
    }

    #manageCategoryBtn:hover,
    #addCategoryBtn:hover {
        transform: none;
    }

    .category-manager-item:hover {
        transform: none;
    }
}

/* =========================================
   DARK MODE - EDIT FORM
   ========================================= */

body.dark-mode .edit-modal {
    background: #181b23;
    border: 1px solid #292d37;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

body.dark-mode .edit-modal-header {
    background: #181b23;
    border-bottom-color: #292d37;
}

body.dark-mode .edit-modal-header h2 {
    color: #f9fafb;
}

body.dark-mode .edit-modal-header p {
    color: #9ca3af;
}

body.dark-mode .modal-close {
    background: #222631;
    color: #9ca3af;
}

body.dark-mode .modal-close:hover {
    background: #2b3040;
    color: #ffffff;
}

/* Form edit */
body.dark-mode .edit-form {
    background: #181b23;
}

body.dark-mode .edit-form label {
    color: #d1d5db;
}

body.dark-mode .edit-form input,
body.dark-mode .edit-form select,
body.dark-mode .edit-form textarea {
    background: #11141b;
    color: #f3f4f6;
    border-color: #303540;
}

body.dark-mode .edit-form input::placeholder,
body.dark-mode .edit-form textarea::placeholder {
    color: #6b7280;
}

body.dark-mode .edit-form input:hover,
body.dark-mode .edit-form select:hover,
body.dark-mode .edit-form textarea:hover {
    border-color: #454b5a;
}

body.dark-mode .edit-form input:focus,
body.dark-mode .edit-form select:focus,
body.dark-mode .edit-form textarea:focus {
    background: #151821;
    color: #ffffff;
    border-color: #8b7cf6;
    box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.12);
}

/* Dropdown edit */
body.dark-mode .edit-form select option {
    background: #181b23;
    color: #f3f4f6;
}

/* Tombol edit */
body.dark-mode .edit-modal-actions {
    background: #181b23;
    border-top-color: #292d37;
}

body.dark-mode .cancel-button {
    background: #222631;
    color: #d1d5db;
    border-color: #303540;
}

body.dark-mode .cancel-button:hover {
    background: #2b3040;
    color: #ffffff;
}

body.dark-mode .save-button {
    background: #6d5dfc;
    color: #ffffff;
}

body.dark-mode .save-button:hover {
    background: #5b4df0;
}

/* Scrollbar modal */
body.dark-mode .edit-modal::-webkit-scrollbar {
    width: 6px;
}

body.dark-mode .edit-modal::-webkit-scrollbar-thumb {
    background: #3a3f4d;
}

body.dark-mode .edit-modal::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================================
   LOGOUT BUTTON
========================================= */

.logout-button {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #6b7280;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.logout-button span:first-child {
    font-size: 18px;
    line-height: 1;
    transform: rotate(180deg);
}

.logout-button:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.08);
}

.logout-button:active {
    transform: translateY(0);
}

body.dark-mode .logout-button {
    background: #181b23;
    border-color: #303540;
    color: #9ca3af;
}

body.dark-mode .logout-button:hover {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

/* =========================================
   PROFILE PAGE
========================================= */

.profile-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    background: #f8f9fc;
}

.profile-card {
    width: 100%;
    max-width: 620px;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #eeeef5;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(30, 27, 75, 0.08);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        #8b7cf6,
        #a78bfa
    );
    color: white;
    font-size: 26px;
    font-weight: 700;
}

.profile-header h1 {
    margin: 0 0 5px;
    color: #111827;
    font-size: 24px;
}

.profile-header p {
    margin: 0;
    color: #8b8da3;
    font-size: 13px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-field {
    padding: 16px 18px;
    background: #f9fafc;
    border: 1px solid #eeeef5;
    border-radius: 14px;
}

.profile-field label {
    display: block;
    margin-bottom: 6px;
    color: #9a9caf;
    font-size: 12px;
}

.profile-field div {
    color: #25243a;
    font-size: 14px;
    font-weight: 600;
    word-break: break-word;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-profile,
.btn-logout {
    flex: 1;
    padding: 13px 18px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-profile {
    background: #8b7cf6;
    color: white;
}

.btn-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 124, 246, 0.25);
}

.btn-logout {
    background: #fff1f2;
    color: #e11d48;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.12);
}

.back-dashboard {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border: none;
    background: transparent;
    color: #8b7cf6;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.back-dashboard:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {

    .profile-page {
        padding: 20px 14px;
    }

    .profile-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

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

}

/* =========================================
   PROFILE EDIT MODAL
========================================= */

.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.profile-modal.show {
    opacity: 1;
    visibility: visible;
}

.profile-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(17, 24, 39, 0.45);

    backdrop-filter: blur(5px);
}

.profile-modal-box {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 460px;

    background: #ffffff;

    border: 1px solid #eeeef5;
    border-radius: 22px;

    box-shadow:
        0 25px 70px rgba(30, 27, 75, 0.18);

    transform: translateY(15px) scale(0.97);

    transition:
        transform 0.25s ease;
}

.profile-modal.show .profile-modal-box {
    transform: translateY(0) scale(1);
}


/* HEADER */

.profile-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    padding: 24px 24px 18px;

    border-bottom: 1px solid #f0f0f5;
}

.profile-modal-header h2 {
    margin: 0 0 5px;

    color: #111827;

    font-size: 19px;
    font-weight: 700;
}

.profile-modal-header p {
    margin: 0;

    color: #9496a8;

    font-size: 12px;
}

.profile-modal-close {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 10px;

    background: #f5f5f8;

    color: #77798c;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.profile-modal-close:hover {
    background: #ececf2;
    color: #111827;
    transform: rotate(3deg);
}


/* BODY */

.profile-modal-body {
    padding: 22px 24px;
}

.profile-input-group {
    margin-bottom: 18px;
}

.profile-input-group:last-child {
    margin-bottom: 0;
}

.profile-input-group label {
    display: block;

    margin-bottom: 7px;

    color: #4b4d61;

    font-size: 12px;
    font-weight: 600;
}

.profile-input-group input {
    width: 100%;

    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid #e4e5ed;
    border-radius: 11px;

    background: #fafafd;

    color: #222338;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.profile-input-group input:focus {
    border-color: #8b7cf6;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(139, 124, 246, 0.09);
}

.profile-input-group input[readonly] {
    background: #f3f3f7;
    color: #858798;
    cursor: not-allowed;
}

.profile-input-group small {
    display: block;

    margin-top: 6px;

    color: #a0a1b0;

    font-size: 11px;
}


/* ACTIONS */

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

    padding: 18px 24px 22px;

    border-top: 1px solid #f0f0f5;
}

.profile-btn-cancel,
.profile-btn-save {
    min-width: 95px;

    padding: 11px 17px;

    border: none;
    border-radius: 10px;

    font-family: inherit;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.profile-btn-cancel {
    background: #f3f3f7;
    color: #66687a;
}

.profile-btn-cancel:hover {
    background: #eaeaf0;
}

.profile-btn-save {
    background: #8b7cf6;
    color: #ffffff;
}

.profile-btn-save:hover {
    transform: translateY(-1px);

    box-shadow:
        0 7px 18px rgba(139, 124, 246, 0.22);
}

.profile-btn-save:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
    box-shadow: none;
}


/* MOBILE */

@media (max-width: 600px) {

    .profile-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .profile-modal-box {
        max-width: none;

        border-radius: 20px;
    }

    .profile-modal-header {
        padding: 20px 20px 16px;
    }

    .profile-modal-body {
        padding: 20px;
    }

    .profile-modal-actions {
        padding: 16px 20px 20px;
    }

}

/* =========================================
   PROFILE SUCCESS TOAST
========================================= */

.profile-toast {
    position: fixed;

    top: 24px;
    right: 24px;

    z-index: 10000;

    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 300px;
    max-width: 380px;

    padding: 14px 14px 14px 14px;

    background: #ffffff;

    border: 1px solid #ececf4;
    border-radius: 14px;

    box-shadow:
        0 15px 40px rgba(30, 27, 75, 0.14);

    transform:
        translateX(calc(100% + 40px));

    opacity: 0;

    pointer-events: none;

    transition:
        transform 0.35s cubic-bezier(.22,1,.36,1),
        opacity 0.25s ease;
}

.profile-toast.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.profile-toast-icon {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #ecfdf5;

    color: #10b981;

    font-size: 17px;
    font-weight: 700;
}

.profile-toast-content {
    display: flex;
    flex-direction: column;

    gap: 3px;

    flex: 1;
}

.profile-toast-content strong {
    color: #181827;

    font-size: 13px;
    font-weight: 700;
}

.profile-toast-content span {
    color: #888a9b;

    font-size: 11px;
    line-height: 1.4;
}

.profile-toast button {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 8px;

    background: transparent;

    color: #9a9baa;

    font-size: 18px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.profile-toast button:hover {
    background: #f4f4f7;
    color: #333447;
}


/* MOBILE */

@media (max-width: 600px) {

    .profile-toast {
        top: 14px;
        left: 14px;
        right: 14px;

        min-width: 0;
        max-width: none;

        transform:
            translateY(-120px);
    }

    .profile-toast.show {
        transform:
            translateY(0);
    }

}

/* =========================================
   BACK TO DASHBOARD
========================================= */

.back-dashboard {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    margin-top: 18px;
    padding: 12px 16px;

    border: 1px solid #e8e7f2;
    border-radius: 12px;

    background: #ffffff;

    color: #66687a;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.back-dashboard-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border-radius: 8px;

    background: #f3f2ff;

    color: #8b7cf6;

    font-size: 15px;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease;
}

.back-dashboard:hover {
    color: #8b7cf6;

    border-color: #dcd8fa;

    background: #faf9ff;

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(139, 124, 246, 0.08);
}

.back-dashboard:hover .back-dashboard-icon {
    transform: translateX(-3px);

    background: #8b7cf6;

    color: #ffffff;
}

.back-dashboard:active {
    transform: translateY(0);
}

/* =========================================
   DASHBOARD PROFILE BUTTON
========================================= */

.profile-button {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 5px 11px 5px 5px;

    border: 1px solid #e9e8f2;
    border-radius: 12px;

    background: #ffffff;

    color: #353548;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.profile-button:hover {
    background: #faf9ff;
    border-color: #ddd9f7;

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(139, 124, 246, 0.09);
}

.profile-button-avatar {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: linear-gradient(
        135deg,
        #8b7cf6,
        #a78bfa
    );

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;
}

.profile-button-name {
    max-width: 100px;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* MOBILE */

@media (max-width: 600px) {

    .profile-button-name {
        display: none;
    }

    .profile-button {
        padding: 5px;
    }

}

/* =========================================
   DASHBOARD PROFILE BUTTON - DARK MODE
========================================= */

body.dark-mode .profile-button {
    background: #1b2230;
    border-color: #2d3748;
    color: #e5e7eb;
}

body.dark-mode .profile-button:hover {
    background: #252f3f;
    border-color: #4b5563;
    color: #ffffff;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.25);
}

body.dark-mode .profile-button-avatar {
    background: linear-gradient(
        135deg,
        #8b7cf6,
        #a78bfa
    );
    color: #ffffff;
}

/* =========================================
   PROFILE - DARK MODE
   MENYESUAIKAN DENGAN DASHBOARD
========================================= */

body.dark-mode .profile-page {
    background: #0f1117 !important;
    color: #f9fafb;
}

/* KARTU PROFILE */
body.dark-mode .profile-card {
    background: #171b24 !important;
    color: #f9fafb !important;
    border-color: #292f3b !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* HEADER PROFILE */
body.dark-mode .profile-header h1 {
    color: #ffffff !important;
}

body.dark-mode .profile-header p {
    color: #9ca3af !important;
}

/* AVATAR */
body.dark-mode .profile-avatar {
    color: #ffffff !important;
}

/* INFORMASI PROFILE */
body.dark-mode .profile-info {
    background: transparent !important;
}

body.dark-mode .profile-field {
    background: #1d2330 !important;
    border-color: #2d3544 !important;
}

body.dark-mode .profile-field label {
    color: #9ca3af !important;
}

body.dark-mode .profile-field div {
    color: #f3f4f6 !important;
}

/* TOMBOL EDIT */
body.dark-mode .btn-profile {
    background: #7c6ee6 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-profile:hover {
    background: #6d5ed1 !important;
}

/* TOMBOL LOGOUT */
body.dark-mode .btn-logout {
    background: #2a1d23 !important;
    color: #fca5a5 !important;
    border-color: #4a2932 !important;
}

body.dark-mode .btn-logout:hover {
    background: #3a222a !important;
}

/* KEMBALI DASHBOARD */
body.dark-mode .back-dashboard {
    background: #1d2330 !important;
    color: #e5e7eb !important;
    border-color: #2d3544 !important;
}

body.dark-mode .back-dashboard:hover {
    background: #293241 !important;
    color: #ffffff !important;
}

/* =========================================
   MODAL EDIT PROFILE
========================================= */

body.dark-mode .profile-modal {
    background: rgba(0, 0, 0, 0.70) !important;
}

body.dark-mode .profile-modal-box {
    background: #171b24 !important;
    color: #f9fafb !important;
    border: 1px solid #303746 !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

body.dark-mode .profile-modal-header h2 {
    color: #ffffff !important;
}

body.dark-mode .profile-modal-header p {
    color: #9ca3af !important;
}

body.dark-mode .profile-modal-close {
    color: #9ca3af !important;
    background: #222936 !important;
}

body.dark-mode .profile-modal-close:hover {
    background: #303847 !important;
    color: #ffffff !important;
}

body.dark-mode .profile-input-group label {
    color: #d1d5db !important;
}

body.dark-mode .profile-input-group input {
    background: #0f131b !important;
    color: #ffffff !important;
    border-color: #343d4d !important;
}

body.dark-mode .profile-input-group input:focus {
    background: #111722 !important;
    border-color: #8b7cf6 !important;
    outline: none;
}

body.dark-mode .profile-input-group input::placeholder {
    color: #6b7280 !important;
}

body.dark-mode .profile-input-group small {
    color: #7f8999 !important;
}

/* MODAL BUTTON */
body.dark-mode .profile-btn-cancel {
    background: #252c38 !important;
    color: #d1d5db !important;
    border-color: #374151 !important;
}

body.dark-mode .profile-btn-cancel:hover {
    background: #303847 !important;
}

body.dark-mode .profile-btn-save {
    background: #7c6ee6 !important;
    color: #ffffff !important;
}

body.dark-mode .profile-btn-save:hover {
    background: #6d5ed1 !important;
}

/* =========================================
   TOAST
========================================= */

body.dark-mode .profile-toast {
    background: #171b24 !important;
    color: #ffffff !important;
    border: 1px solid #303746 !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
}

body.dark-mode .profile-toast-content strong {
    color: #ffffff !important;
}

body.dark-mode .profile-toast-content span {
    color: #9ca3af !important;
}

body.dark-mode .profile-toast > button {
    color: #9ca3af !important;
}

body.dark-mode .profile-toast > button:hover {
    color: #ffffff !important;
}

/* =========================================
   STATISTIK GRAFIK
========================================= */

.statistics-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.statistics-header {
    margin-bottom: 24px;
}

.statistics-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #111827;
}

.statistics-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.statistics-content {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1fr;
    align-items: center;
    gap: 40px;
}

.statistics-chart {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 280px;
    margin: auto;
}

.statistics-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.statistics-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.statistics-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    transition: transform 0.25s ease, background 0.25s ease;
}

.statistics-item:hover {
    transform: translateY(-2px);
}

.statistics-item > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.statistics-item span:not(.statistics-dot) {
    font-size: 13px;
    color: #6b7280;
}

.statistics-item strong {
    font-size: 18px;
    color: #111827;
}

.statistics-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.statistics-dot.completed {
    background: #10b981;
}

.statistics-dot.pending {
    background: #f59e0b;
}

.statistics-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 16px;
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
}

.statistics-total span {
    color: #6b7280;
    font-size: 14px;
}

.statistics-total strong {
    font-size: 24px;
    color: #111827;
}


/* =========================================
   DARK MODE
========================================= */

body.dark-mode .statistics-card {
    background: #171b24;
    border-color: #292f3b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body.dark-mode .statistics-header h2 {
    color: #ffffff;
}

body.dark-mode .statistics-header p {
    color: #9ca3af;
}

body.dark-mode .statistics-item {
    background: #1d2330;
}

body.dark-mode .statistics-item span:not(.statistics-dot) {
    color: #9ca3af;
}

body.dark-mode .statistics-item strong {
    color: #f9fafb;
}

body.dark-mode .statistics-total {
    border-color: #303746;
}

body.dark-mode .statistics-total span {
    color: #9ca3af;
}

body.dark-mode .statistics-total strong {
    color: #ffffff;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 700px) {

    .statistics-card {
        padding: 20px;
    }

    .statistics-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .statistics-chart {
        height: 250px;
    }

}

/* =========================================
   MOBILE HEADER FIX
   ========================================= */

@media (max-width: 600px) {

    .header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    /* =========================
       BRAND
       ========================= */

    .brand {
        width: 100%;
        position: relative;
        z-index: 2;
    }

    .brand h1 {
        margin: 0;
        font-size: 26px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .brand p {
        margin-top: 4px;
        font-size: 10px;
    }

    /* =========================
       AREA BUTTON
       ========================= */

    .header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
    }

    .profile-button,
    .theme-toggle,
    .logout-button {
        flex-shrink: 0;
    }

    /* Profile */
    .profile-button {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
        border-radius: 12px;
    }

    .profile-button-name {
        display: none;
    }

    .profile-button-avatar {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    /* Theme */
    .theme-toggle {
        width: 42px;
        height: 42px;
        min-width: 42px;
        padding: 0;
        border-radius: 12px;
    }

    /* Logout */
    .logout-button {
        width: 42px;
        height: 42px;
        min-width: 42px;
        padding: 0;
    }

    /* =========================
       NOTIFICATION
       ========================= */

    .notification-card {
        width: 100%;
        box-sizing: border-box;
        margin-top: 2px;
    }

    .notification-card button {
        width: 100%;
    }
}

/* =========================================
   STATISTIK - MOBILE
   ========================================= */

@media (max-width: 600px) {

    .statistics-card {
        padding: 16px;
        border-radius: 16px;
    }

    .statistics-header h2 {
        font-size: 17px;
        margin-bottom: 4px;
    }

    .statistics-header p {
        font-size: 11px;
        line-height: 1.4;
    }

    .statistics-content {
        gap: 14px;
        margin-top: 14px;
    }

    /* Grafik */
    .statistics-chart {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }

    .statistics-chart canvas {
        width: 150px !important;
        height: 150px !important;
    }

    /* Ringkasan statistik */
    .statistics-summary {
        width: 100%;
        gap: 8px;
    }

    .statistics-item {
        padding: 9px 11px;
        border-radius: 10px;
    }

    .statistics-item span {
        font-size: 11px;
    }

    .statistics-item strong {
        font-size: 13px;
    }

    .statistics-dot {
        width: 8px;
        height: 8px;
        min-width: 8px;
    }

    .statistics-total {
        padding: 10px 11px;
        border-radius: 10px;
    }

    .statistics-total span {
        font-size: 11px;
    }

    .statistics-total strong {
        font-size: 16px;
    }
}

/* =========================================
   KALENDER DEADLINE
   ========================================= */

.calendar-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 20px;
    padding: 22px;
    margin-top: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.calendar-header p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-navigation strong {
    min-width: 145px;
    text-align: center;
    font-size: 14px;
}

.calendar-navigation button {
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s ease;
}

.calendar-navigation button:hover {
    transform: translateY(-2px);
}

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

.calendar-weekdays {
    margin-bottom: 6px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    padding: 7px 0;
}

.calendar-day {
    position: relative;
    min-height: 48px;
    border: 1px solid #eef2f7;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s ease;
}

.calendar-day:hover {
    background: #f5f3ff;
    border-color: #c4b5fd;
    transform: translateY(-1px);
}

.calendar-day.other-month {
    color: #cbd5e1;
    background: #f8fafc;
}

.calendar-day.today {
    border: 2px solid #8b5cf6;
    font-weight: 700;
}

.calendar-day.selected {
    background: #ede9fe;
    border-color: #8b5cf6;
    font-weight: 700;
}

.calendar-day.has-task::after {
    content: "";
    position: absolute;
    bottom: 6px;
    width: 5px;
    height: 5px;
    background: #f59e0b;
    border-radius: 50%;
}

.calendar-day.has-completed-task::after {
    background: #10b981;
}

.calendar-task-list {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

.calendar-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 10px;
}

.calendar-task {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 7px;
    border-radius: 10px;
    background: #f8fafc;
}

.calendar-task-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}

.calendar-task.completed .calendar-task-title {
    text-decoration: line-through;
    opacity: 0.55;
}

.calendar-task-priority {
    font-size: 10px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
}


/* =========================================
   DARK MODE
   ========================================= */

body.dark-mode .calendar-card {
    background: #111827;
    border-color: #273244;
}

body.dark-mode .calendar-header p {
    color: #94a3b8;
}

body.dark-mode .calendar-navigation button {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

body.dark-mode .calendar-day {
    background: #18202d;
    border-color: #273244;
    color: #e5e7eb;
}

body.dark-mode .calendar-day.other-month {
    background: #111827;
    color: #475569;
}

body.dark-mode .calendar-day:hover,
body.dark-mode .calendar-day.selected {
    background: #29214f;
    border-color: #8b5cf6;
}

body.dark-mode .calendar-task-list {
    border-color: #273244;
}

body.dark-mode .calendar-task {
    background: #1f2937;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {

    .calendar-card {
        padding: 15px;
        border-radius: 16px;
        margin-top: 16px;
    }

    .calendar-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 14px;
    }

    .calendar-header h2 {
        font-size: 17px;
    }

    .calendar-header p {
        font-size: 11px;
    }

    .calendar-navigation {
        width: 100%;
        justify-content: space-between;
    }

    .calendar-navigation strong {
        font-size: 13px;
    }

    .calendar-weekdays,
    .calendar-days {
        gap: 4px;
    }

    .calendar-weekdays span {
        font-size: 9px;
        padding: 5px 0;
    }

    .calendar-day {
        min-height: 38px;
        border-radius: 8px;
        font-size: 11px;
    }

    .calendar-day.has-task::after {
        bottom: 4px;
        width: 4px;
        height: 4px;
    }

    .calendar-task {
        padding: 9px;
    }

    .calendar-task-title {
        font-size: 11px;
    }

    .calendar-task-priority {
        font-size: 9px;
    }
}

.statistics-item strong,
.statistics-total strong {
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

/* =========================================
   TODO VIEW TOGGLE
========================================= */

.view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
}

.view-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.view-toggle-btn:hover {
    background: #e2e8f0;
    color: #4f46e5;
}

.view-toggle-btn:active {
    transform: scale(0.92);
}

.view-toggle-btn.active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}


/* =========================================
   LIST VIEW
========================================= */

#todoList.list-view {
    grid-template-columns: 1fr;
}

#todoList.list-view .todo-card {
    width: 100%;
}


/* =========================================
   DARK MODE
========================================= */

body.dark-mode .view-toggle {
    background: #1b2230;
}

body.dark-mode .view-toggle-btn {
    color: #94a3b8;
}

body.dark-mode .view-toggle-btn:hover {
    background: #2d3748;
    color: #a5b4fc;
}

body.dark-mode .view-toggle-btn.active {
    background: #2d3748;
    color: #a5b4fc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .todo-header {
        align-items: center;
    }

    .view-toggle-btn {
        width: 34px;
        height: 34px;
    }

}

/* Sembunyikan tombol tampilan di mobile */
@media (max-width: 600px) {
    .view-toggle {
        display: none !important;
    }
}

/* =========================================
   PRODUCTIVITY SCORE
========================================= */

.productivity-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.productivity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}


.productivity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


.productivity-title {
    display: flex;
    align-items: center;
    gap: 14px;
}


.productivity-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ede9fe;
    color: #7c3aed;

    font-size: 19px;
}


.productivity-title h2 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #111827;
}


.productivity-title p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}


.productivity-score {
    text-align: right;
    flex-shrink: 0;
}


.productivity-score strong {
    display: block;
    font-size: 32px;
    line-height: 1;
    color: #7c3aed;
}


.productivity-score span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
}


.productivity-progress {
    width: 100%;
    height: 12px;
    margin-top: 24px;

    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}


.productivity-fill {
    width: 0%;
    height: 100%;

    background: linear-gradient(
        90deg,
        #8b5cf6,
        #6366f1
    );

    border-radius: inherit;

    transition: width 0.8s ease;
}


.productivity-info {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 12px;

    font-size: 13px;
    color: #64748b;
}


.productivity-status {
    font-weight: 600;
    color: #7c3aed;
}


/* =========================================
   DARK MODE
========================================= */

body.dark-mode .productivity-card {
    background: #111827;
    border-color: #273244;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

body.dark-mode .productivity-title h2 {
    color: #f8fafc;
}

body.dark-mode .productivity-title p,
body.dark-mode .productivity-score span,
body.dark-mode .productivity-info {
    color: #94a3b8;
}

body.dark-mode .productivity-icon {
    background: #2e2250;
    color: #a78bfa;
}

body.dark-mode .productivity-score strong,
body.dark-mode .productivity-status {
    color: #a78bfa;
}

body.dark-mode .productivity-progress {
    background: #1f2937;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .productivity-card {
        padding: 20px;
        border-radius: 18px;
    }

    .productivity-header {
        align-items: flex-start;
    }

    .productivity-title {
        gap: 10px;
    }

    .productivity-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .productivity-title h2 {
        font-size: 16px;
    }

    .productivity-title p {
        font-size: 12px;
    }

    .productivity-score strong {
        font-size: 26px;
    }

    .productivity-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

}

/* =========================================================
   KERJAIN — PREMIUM UI/UX PATCH
   Tempel di PALING BAWAH style.css
========================================================= */


/* =========================================================
   1. GLOBAL POLISH
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
    font-family: inherit;
}


/* =========================================================
   2. MAIN APP
========================================================= */

.app {
    position: relative;
}


/* =========================================================
   3. HEADER PREMIUM
========================================================= */

.header {
    position: relative;
    z-index: 20;
}

.brand h1 {
    letter-spacing: -1.2px;
    transition: transform 0.3s ease;
}

.brand h1:hover {
    transform: translateY(-1px);
}

.brand h1 span {
    transition: opacity 0.3s ease;
}

.brand:hover h1 span {
    opacity: 0.7;
}


/* Profile */

.profile-button {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.profile-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.profile-button:active {
    transform: scale(0.97);
}


/* Theme button */

.theme-toggle {
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.theme-toggle:hover {
    transform: rotate(8deg) scale(1.04);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.theme-toggle:active {
    transform: scale(0.92);
}


/* Notification */

.notification-card {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.notification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.notification-card button {
    transition:
        transform 0.2s ease,
        box-shadow 0.25s ease,
        opacity 0.25s ease;
}

.notification-card button:hover {
    transform: translateY(-1px);
}

.notification-card button:active {
    transform: scale(0.96);
}


/* =========================================================
   4. WELCOME CARD
========================================================= */

.welcome-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.welcome-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.10);
}

.welcome-copy {
    position: relative;
    z-index: 3;
}

.welcome-copy h2 {
    letter-spacing: -0.7px;
}


/* Decorative circles */

.decor-circle {
    transition:
        transform 0.8s ease,
        opacity 0.5s ease;
}

.welcome-section:hover .decor-circle-one {
    transform: translate(8px, -6px);
}

.welcome-section:hover .decor-circle-two {
    transform: translate(-8px, 6px);
}


/* Clipboard */

.decor-clipboard {
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease;
}

.welcome-section:hover .decor-clipboard {
    transform: translateY(-5px) rotate(-2deg);
}


/* =========================================================
   5. TODO INPUT — PREMIUM
========================================================= */

.todo-input {
    position: relative;
    z-index: 5;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.todo-input:focus-within {
    transform: translateY(-2px);
    box-shadow:
        0 18px 40px rgba(79, 70, 229, 0.10);
}


/* Input */

.todo-input input,
.todo-input textarea,
.todo-input select {
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.todo-input input:focus,
.todo-input textarea:focus,
.todo-input select:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.09);
}


/* Add button */

#addTodoBtn {
    position: relative;
    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

#addTodoBtn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 22px rgba(79, 70, 229, 0.18);
    filter: brightness(1.02);
}

#addTodoBtn:active {
    transform: scale(0.97);
}


/* =========================================================
   6. STAT CARD
========================================================= */

.stat-card {
    position: relative;
    overflow: hidden;

    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.stat-card::after {
    content: "";
    position: absolute;

    width: 100px;
    height: 100px;

    right: -45px;
    bottom: -50px;

    border-radius: 50%;

    background: rgba(99, 102, 241, 0.04);

    pointer-events: none;

    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 16px 32px rgba(15, 23, 42, 0.09);
}

.stat-card:hover::after {
    transform: scale(1.35);
}


/* Icon */

.stat-icon {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.06) rotate(-3deg);
}


/* Number */

.stat-card strong {
    transition:
        transform 0.3s ease,
        color 0.3s ease;
}

.stat-card:hover strong {
    transform: translateY(-1px);
}


/* =========================================================
   7. PROGRESS CARD
========================================================= */

.progress-card {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.progress-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 14px 30px rgba(15, 23, 42, 0.08);
}

.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: "";

    position: absolute;
    top: 0;
    left: -40%;

    width: 40%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );

    animation: progressShine 2.8s ease-in-out infinite;
}

@keyframes progressShine {

    0% {
        left: -40%;
    }

    60% {
        left: 110%;
    }

    100% {
        left: 110%;
    }

}


/* =========================================================
   8. STATISTICS GRAPH
========================================================= */

.statistics-card {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.statistics-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 34px rgba(15, 23, 42, 0.08);
}

.statistics-item {
    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.statistics-item:hover {
    transform: translateX(4px);
}


/* =========================================================
   9. PRODUCTIVITY SCORE
========================================================= */

.productivity-card {
    position: relative;
    overflow: hidden;

    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease;
}

.productivity-card::before {
    content: "";

    position: absolute;

    top: -80px;
    right: -70px;

    width: 190px;
    height: 190px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(124, 58, 237, 0.10),
            transparent 70%
        );

    pointer-events: none;
}

.productivity-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 38px rgba(79, 70, 229, 0.10);
}

.productivity-score strong {
    transition:
        transform 0.3s ease;
}

.productivity-card:hover .productivity-score strong {
    transform: scale(1.04);
}

.productivity-fill {
    position: relative;
    overflow: hidden;
}

.productivity-fill::after {
    content: "";

    position: absolute;
    top: 0;
    left: -50%;

    width: 50%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.30),
        transparent
    );

    animation: productivityShine 3s ease-in-out infinite;
}

@keyframes productivityShine {

    0% {
        left: -50%;
    }

    65% {
        left: 110%;
    }

    100% {
        left: 110%;
    }

}


/* =========================================================
   10. CALENDAR PREMIUM
========================================================= */

.calendar-card {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.calendar-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 34px rgba(15, 23, 42, 0.08);
}

.calendar-navigation button {
    transition:
        transform 0.2s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.calendar-navigation button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 14px rgba(15, 23, 42, 0.08);
}

.calendar-navigation button:active {
    transform: scale(0.90);
}

.calendar-day {
    transition:
        transform 0.2s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow:
        0 5px 12px rgba(15, 23, 42, 0.08);
}


/* =========================================================
   11. TODO HEADER
========================================================= */

.todo-header {
    position: relative;
}

.todo-header h2 {
    letter-spacing: -0.6px;
}


/* =========================================================
   12. SEARCH BOX
========================================================= */

.search-box {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.search-box:focus-within {
    transform: translateY(-1px);
    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.07);
}

.search-box input:focus {
    outline: none;
}


/* Filter */

#filterTodo {
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

#filterTodo:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.08);
}


/* =========================================================
   13. TODO CARD PREMIUM
========================================================= */

.todo-card {
    position: relative;

    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.32s ease,
        border-color 0.32s ease;
}

.todo-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 16px 32px rgba(15, 23, 42, 0.10);
}

.todo-card:active {
    transform: translateY(-2px);
}


/* Checkbox */

.todo-card input[type="checkbox"] {
    transition:
        transform 0.2s ease;
}

.todo-card input[type="checkbox"]:hover {
    transform: scale(1.08);
}


/* Task title */

.todo-card h3,
.todo-card .todo-title {
    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}


/* Action buttons */

.todo-card button {
    transition:
        transform 0.2s ease,
        background 0.25s ease,
        color 0.25s ease;
}

.todo-card button:hover {
    transform: translateY(-2px);
}

.todo-card button:active {
    transform: scale(0.92);
}


/* =========================================================
   14. CATEGORY / PRIORITY / DEADLINE CHIP
========================================================= */

.todo-card [class*="category"],
.todo-card [class*="priority"],
.todo-card [class*="deadline"] {
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.todo-card:hover [class*="category"],
.todo-card:hover [class*="priority"],
.todo-card:hover [class*="deadline"] {
    transform: translateY(-1px);
}


/* =========================================================
   15. REMINDER
========================================================= */

.reminder-box {
    animation: reminderAppear 0.4s ease both;
}

@keyframes reminderAppear {

    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   16. EMPTY STATE
========================================================= */

.empty-state {
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.empty-state:hover {
    transform: translateY(-3px);
}

.empty-icon {
    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}

.empty-state:hover .empty-icon {
    transform: scale(1.05) rotate(-3deg);
}


/* =========================================================
   17. VIEW TOGGLE
========================================================= */

.view-toggle {
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.05);
}

.view-toggle-btn {
    transition:
        transform 0.2s ease,
        background 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}

.view-toggle-btn:hover {
    transform: translateY(-1px);
}

.view-toggle-btn:active {
    transform: scale(0.92);
}


/* =========================================================
   18. FOOTER
========================================================= */

.footer {
    transition:
        opacity 0.3s ease;
}

.footer:hover {
    opacity: 0.85;
}


/* =========================================================
   19. GLOBAL BUTTON FEEDBACK
========================================================= */

button:not(:disabled) {
    -webkit-tap-highlight-color: transparent;
}

button:not(:disabled):active {
    transition-duration: 0.08s;
}


/* =========================================================
   20. REDUCE MOTION
   Tetap nyaman untuk user yang mematikan animasi
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

}


/* =========================================================
   21. MOBILE POLISH
========================================================= */

@media (max-width: 600px) {

    .welcome-section:hover,
    .todo-input:focus-within,
    .stat-card:hover,
    .progress-card:hover,
    .statistics-card:hover,
    .productivity-card:hover,
    .calendar-card:hover,
    .todo-card:hover {
        transform: none;
    }

    .todo-card:hover {
        box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.07);
    }

    .stat-card:hover {
        box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.07);
    }

    .todo-input:focus-within {
        box-shadow:
            0 10px 24px rgba(79, 70, 229, 0.07);
    }

    .welcome-decoration {
        opacity: 0.7;
    }

}


/* =========================================================
   22. DARK MODE — PREMIUM POLISH
========================================================= */

body.dark-mode .profile-button:hover,
body.dark-mode .theme-toggle:hover,
body.dark-mode .notification-card:hover,
body.dark-mode .stat-card:hover,
body.dark-mode .progress-card:hover,
body.dark-mode .statistics-card:hover,
body.dark-mode .productivity-card:hover,
body.dark-mode .calendar-card:hover,
body.dark-mode .todo-card:hover {
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.22);
}

body.dark-mode .todo-input input:focus,
body.dark-mode .todo-input textarea:focus,
body.dark-mode .todo-input select:focus,
body.dark-mode #filterTodo:focus {
    border-color: #6366f1;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.12);
}

body.dark-mode .search-box:focus-within {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.20);
}

/* =========================================================
   DETAIL TUGAS MODAL
========================================================= */

.task-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.task-detail-overlay.show {
    opacity: 1;
    visibility: visible;
}

.task-detail-modal {
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 22px;

    box-shadow:
        0 25px 70px rgba(15, 23, 42, 0.20);

    transform: translateY(20px) scale(0.97);

    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.task-detail-overlay.show .task-detail-modal {
    transform: translateY(0) scale(1);
}


/* Header */

.task-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;
    padding: 24px 24px 18px;

    border-bottom: 1px solid #f1f5f9;
}

.task-detail-title-wrap {
    min-width: 0;
}

.task-detail-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 700;
    color: #6366f1;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.task-detail-title {
    margin: 0;

    font-size: 22px;
    line-height: 1.35;
    font-weight: 750;

    color: #111827;
    overflow-wrap: anywhere;
}

.task-detail-close {
    flex-shrink: 0;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 10px;

    background: #f8fafc;
    color: #64748b;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.task-detail-close:hover {
    background: #f1f5f9;
    color: #ef4444;
    transform: rotate(4deg);
}

.task-detail-close:active {
    transform: scale(0.92);
}


/* Body */

.task-detail-body {
    padding: 22px 24px;
}

.task-detail-description {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
}


.task-detail-description-label {
    display: block;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.task-detail-description-text {
    display: block !important;

    width: 100% !important;
    box-sizing: border-box !important;

    margin: 0 !important;
    padding: 14px 16px !important;

    min-height: 0 !important;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #f8fafc;
    color: #334155;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;

    text-align: left !important;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;

    /* pastikan bukan flex */
    flex: none !important;
    align-items: initial !important;
    justify-content: initial !important;
}

.task-detail-description-empty {
    color: #94a3b8;
    font-style: italic;
}


/* Info */

.task-detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.task-detail-info-item {
    padding: 14px;

    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 14px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.task-detail-info-item:hover {
    transform: translateY(-2px);
    border-color: #e2e8f0;
}

.task-detail-info-label {
    display: block;

    margin-bottom: 6px;

    font-size: 11px;
    font-weight: 700;

    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-detail-info-value {
    display: block;

    font-size: 14px;
    font-weight: 650;

    color: #334155;
}


/* Footer */

.task-detail-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 18px 24px 24px;

    border-top: 1px solid #f1f5f9;
}

.task-detail-btn {
    min-height: 40px;

    padding: 0 16px;

    border: none;
    border-radius: 10px;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.task-detail-btn:hover {
    transform: translateY(-1px);
}

.task-detail-btn:active {
    transform: scale(0.96);
}

.task-detail-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.task-detail-btn-secondary:hover {
    background: #e2e8f0;
}

.task-detail-btn-primary {
    background: #6366f1;
    color: #ffffff;

    box-shadow:
        0 6px 16px rgba(99, 102, 241, 0.18);
}

.task-detail-btn-primary:hover {
    box-shadow:
        0 9px 20px rgba(99, 102, 241, 0.25);
}


/* Dark Mode */

body.dark-mode .task-detail-modal {
    background: #111827;
    border-color: #263244;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45);
}

body.dark-mode .task-detail-header,
body.dark-mode .task-detail-footer {
    border-color: #263244;
}

body.dark-mode .task-detail-title {
    color: #f8fafc;
}

body.dark-mode .task-detail-close {
    background: #1f2937;
    color: #94a3b8;
}

body.dark-mode .task-detail-close:hover {
    background: #273449;
    color: #f87171;
}

body.dark-mode .task-detail-description-text {
    background: #1b2432 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;

    text-align: left !important;
}

body.dark-mode .task-detail-info-item {
    background: #1b2432;
    border-color: #293548;
}

body.dark-mode .task-detail-info-value {
    color: #e2e8f0;
}

body.dark-mode .task-detail-btn-secondary {
    background: #273449;
    color: #cbd5e1;
}

body.dark-mode .task-detail-btn-secondary:hover {
    background: #334155;
}


/* Mobile */

@media (max-width: 600px) {

    .task-detail-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .task-detail-modal {
        width: 100%;
        max-height: 88vh;

        border-radius: 22px 22px 0 0;

        transform: translateY(30px);
    }

    .task-detail-overlay.show .task-detail-modal {
        transform: translateY(0);
    }

    .task-detail-header {
        padding: 20px 18px 16px;
    }

    .task-detail-body {
        padding: 20px 18px;
    }

    .task-detail-footer {
        padding: 16px 18px 20px;
    }

    .task-detail-info {
        grid-template-columns: 1fr;
    }

    .task-detail-title {
        font-size: 20px;
    }

}

/* ==========================================
   DETAIL TUGAS - SMOOTH MODAL ANIMATION
========================================== */

.task-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, 0);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease,
        background 0.35s ease;

    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.task-detail-overlay.show {
    opacity: 1;
    visibility: visible;

    background: rgba(15, 23, 42, 0.45);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* ==========================================
   MODAL
========================================== */

.task-detail-modal {
    width: min(520px, 100%);
    max-height: min(700px, 90vh);

    overflow-y: auto;

    background: #ffffff;
    border-radius: 24px;

    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.18),
        0 8px 25px rgba(15, 23, 42, 0.08);

    transform:
        translateY(28px)
        scale(0.96);

    opacity: 0;

    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease,
        box-shadow 0.3s ease;

    will-change: transform, opacity;
}


/* Modal masuk */

.task-detail-overlay.show .task-detail-modal {
    transform:
        translateY(0)
        scale(1);

    opacity: 1;
}


/* ==========================================
   HEADER
========================================== */

.task-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 24px 26px 20px;

    border-bottom: 1px solid #eef2f7;
}

.task-detail-title-wrap {
    min-width: 0;
}

.task-detail-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 700;

    color: #6366f1;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.task-detail-title {
    margin: 0;

    font-size: 23px;
    line-height: 1.35;
    font-weight: 750;

    color: #111827;

    overflow-wrap: anywhere;
}


/* ==========================================
   CLOSE BUTTON
========================================== */

.task-detail-close {
    flex-shrink: 0;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 12px;

    background: #f8fafc;
    color: #64748b;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease;
}

.task-detail-close:hover {
    transform: rotate(90deg) scale(1.05);

    background: #f1f5f9;
    color: #111827;
}

.task-detail-close:active {
    transform: rotate(90deg) scale(0.94);
}


/* ==========================================
   BODY
========================================== */

.task-detail-body {
    padding: 24px 26px;
}


/* DESKRIPSI */

.task-detail-description {
    margin-bottom: 24px;
}

.task-detail-description-label {
    display: block;

    margin-bottom: 9px;

    font-size: 13px;
    font-weight: 700;

    color: #475569;
}



.task-detail-description-empty {
    color: #94a3b8;
    font-style: italic;
}


/* ==========================================
   INFO
========================================== */

.task-detail-info {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.task-detail-info-item {
    padding: 15px;

    border: 1px solid #eef2f7;
    border-radius: 14px;

    background: #ffffff;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.task-detail-info-item:hover {
    transform: translateY(-2px);

    border-color: #e0e7ff;

    box-shadow:
        0 8px 20px rgba(99, 102, 241, 0.07);
}

.task-detail-info-label {
    display: block;

    margin-bottom: 6px;

    font-size: 11px;
    font-weight: 700;

    color: #94a3b8;

    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-detail-info-value {
    display: block;

    font-size: 14px;
    font-weight: 650;

    color: #1e293b;

    overflow-wrap: anywhere;
}


/* ==========================================
   FOOTER
========================================== */

.task-detail-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 18px 26px 24px;

    border-top: 1px solid #eef2f7;
}

.task-detail-btn {
    min-height: 42px;

    padding: 0 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: none;
    border-radius: 12px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.task-detail-btn:hover {
    transform: translateY(-2px);
}

.task-detail-btn:active {
    transform: translateY(0) scale(0.97);
}

.task-detail-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.task-detail-btn-secondary:hover {
    background: #e2e8f0;
}

.task-detail-btn-primary {
    background: #6366f1;
    color: #ffffff;

    box-shadow:
        0 6px 16px rgba(99, 102, 241, 0.22);
}

.task-detail-btn-primary:hover {
    background: #4f46e5;

    box-shadow:
        0 10px 24px rgba(99, 102, 241, 0.30);
}


/* ==========================================
   SCROLLBAR MODAL
========================================== */

.task-detail-modal::-webkit-scrollbar {
    width: 6px;
}

.task-detail-modal::-webkit-scrollbar-track {
    background: transparent;
}

.task-detail-modal::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {

    .task-detail-overlay {
        padding: 12px;
        align-items: center;
    }

    .task-detail-modal {
        width: 100%;
        max-height: 92vh;

        border-radius: 20px;

        transform:
            translateY(35px)
            scale(0.97);
    }

    .task-detail-header {
        padding: 20px;
    }

    .task-detail-body {
        padding: 20px;
    }

    .task-detail-footer {
        padding: 16px 20px 20px;
    }

    .task-detail-info {
        grid-template-columns: 1fr;
    }

    .task-detail-title {
        font-size: 20px;
    }

    .task-detail-footer {
        flex-direction: column-reverse;
    }

    .task-detail-btn {
        width: 100%;
    }
}


/* ==========================================
   REDUCE MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

    .task-detail-overlay,
    .task-detail-modal,
    .task-detail-close,
    .task-detail-btn,
    .task-detail-info-item {
        transition: none !important;
    }
}

