:root {
    --bg: #f8f5f2;
    --card: #ffffff;
    --text: #292522;
    --muted: #817a74;
    --border: #e8e1db;
    --primary: #9b6b5d;
    --primary-dark: #795044;
    --green: #668c70;
    --yellow: #b28a45;
    --red: #a65d5d;
    --shadow: 0 8px 30px rgba(60, 45, 35, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "Segoe UI",
        sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-header {
    max-width: 900px;
    margin: 0 auto;
    padding:
        max(24px, env(safe-area-inset-top))
        20px
        10px;

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

.eyebrow {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

h1 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -0.6px;
}

.icon-button {
    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 50%;

    background: var(--primary);
    color: white;

    font-size: 28px;
    line-height: 1;

    box-shadow: var(--shadow);
}

.container {
    width: min(900px, calc(100% - 32px));

    margin: 0 auto;

    padding-bottom: 110px;
}

.summary-card {
    margin-top: 18px;

    padding: 22px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 24px;

    box-shadow: var(--shadow);
}

.summary-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.summary-label {
    display: block;

    color: var(--muted);

    font-size: 13px;

    margin-bottom: 4px;
}

.summary-top strong {
    font-size: 36px;
    letter-spacing: -1px;
}

.summary-count {
    color: var(--muted);

    font-size: 14px;

    padding-bottom: 7px;
}

.progress {
    height: 9px;

    margin-top: 15px;

    background: #eee8e3;

    border-radius: 999px;

    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;

    background: var(--green);

    border-radius: inherit;

    transition: width 0.3s ease;
}

.stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    margin-top: 20px;

    border-top:
        1px solid var(--border);

    padding-top: 18px;
}

.stats > div {
    text-align: center;
}

.stat-number {
    display: block;

    font-size: 19px;
    font-weight: 700;
}

.stat-label {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 12px;
}

.filters {
    display: flex;

    gap: 8px;

    margin: 20px 0;

    overflow-x: auto;

    scrollbar-width: none;
}

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

.filter {
    flex: 0 0 auto;

    border: 1px solid var(--border);

    background: white;
    color: var(--muted);

    border-radius: 999px;

    padding: 9px 15px;

    font-size: 13px;
}

.filter.active {
    background: var(--text);
    color: white;

    border-color: var(--text);
}

.category {
    margin-top: 26px;
}

.category-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    margin-bottom: 10px;
}

.category-title {
    margin: 0;

    font-size: 18px;

    letter-spacing: -0.3px;
}

.category-progress {
    color: var(--muted);

    font-size: 12px;
}

.items {
    display: grid;

    gap: 8px;
}

.item {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 17px;

    padding: 14px;
}

.item-main {
    display: flex;

    align-items: flex-start;

    gap: 12px;
}

.status-button {
    width: 32px;
    height: 32px;

    flex: 0 0 32px;

    border: 1px solid var(--border);

    border-radius: 50%;

    background: white;

    color: var(--muted);

    font-weight: 700;
}

.item.done .status-button {
    background: var(--green);

    color: white;

    border-color: var(--green);
}

.item.maybe .status-button {
    background: #f1e5ca;

    color: var(--yellow);

    border-color: #e3d2a9;
}

.item-content {
    flex: 1;

    min-width: 0;
}

.item-name {
    margin: 0;

    font-size: 15px;

    font-weight: 650;
}

.item.done .item-name {
    color: var(--muted);

    text-decoration: line-through;
}

.item-meta {
    margin-top: 4px;

    color: var(--muted);

    font-size: 12px;
}

.optional {
    display: inline-block;

    margin-left: 5px;

    padding: 2px 6px;

    border-radius: 6px;

    background: #f2eee9;

    font-size: 10px;
}

.item-actions {
    display: flex;

    gap: 5px;

    margin-top: 12px;

    padding-left: 44px;

    flex-wrap: wrap;
}

.item-action {
    border: 1px solid var(--border);

    background: #faf9f7;

    border-radius: 9px;

    padding: 7px 10px;

    color: var(--muted);

    font-size: 11px;
}

.item-action:hover {
    background: #f3efeb;
}

.item-action.done-action {
    color: var(--green);
}

.item-action.maybe-action {
    color: var(--yellow);
}

.item-action.edit-action {
    color: var(--primary);
}

.item-action.delete-action {
    color: var(--red);
}

.floating-add {
    position: fixed;

    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));

    transform: translateX(-50%);

    display: flex;

    align-items: center;

    gap: 8px;

    border: 0;

    border-radius: 999px;

    padding: 13px 20px;

    background: var(--text);

    color: white;

    box-shadow:
        0 10px 30px
        rgba(30, 20, 15, 0.2);

    font-weight: 600;
}

.floating-add span {
    font-size: 20px;

    line-height: 1;
}


/*
 * BOŞ LİSTE
 */

.empty-state {
    min-height: 300px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 40px 20px;

    margin-top: 20px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 24px;

    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 46px;

    line-height: 1;

    margin-bottom: 18px;
}

.empty-state h2 {
    margin: 0;

    font-size: 20px;

    letter-spacing: -0.3px;
}

.empty-state p {
    margin: 8px 0 20px;

    color: var(--muted);

    font-size: 13px;
}

.empty-add-button {
    border: 0;

    border-radius: 12px;

    padding: 12px 18px;

    background: var(--primary);

    color: white;

    font-weight: 700;

    box-shadow: var(--shadow);
}

.empty-add-button:hover {
    background: var(--primary-dark);
}


/*
 * MODAL
 */

.modal {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: flex;

    align-items: flex-end;

    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(30, 20, 15, 0.45);

    backdrop-filter: blur(3px);
}

.modal-card {
    position: relative;

    width: min(600px, 100%);

    background: white;

    border-radius:
        26px 26px 0 0;

    padding: 24px;

    box-shadow:
        0 -10px 50px
        rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;

    font-size: 20px;
}

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

    border: 0;

    border-radius: 50%;

    background: #f3f0ed;

    color: var(--muted);

    font-size: 22px;
}

form {
    display: grid;

    gap: 17px;
}

form label {
    display: grid;

    gap: 7px;

    color: var(--text);

    font-size: 13px;

    font-weight: 600;
}

input,
select {
    width: 100%;

    padding: 13px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background: #faf9f7;

    color: var(--text);

    outline: none;
}

input:focus,
select:focus {
    border-color:
        var(--primary);
}

.checkbox-label {
    display: flex;

    grid-template-columns: none;

    align-items: center;

    gap: 8px;
}

.checkbox-label input {
    width: auto;
}

.primary-button {
    margin-top: 4px;

    border: 0;

    border-radius: 13px;

    padding: 14px;

    background: var(--primary);

    color: white;

    font-weight: 700;
}

.primary-button:hover {
    background: var(--primary-dark);
}


/*
 * MOBİL
 */

@media (max-width: 600px) {

    .item-actions {
        padding-left: 44px;
    }

    .item-action {
        padding:
            7px 9px;

        font-size: 10px;
    }

    .empty-state {
        min-height: 280px;
    }
}


@media (min-width: 700px) {

    .app-header {
        padding-top: 40px;
    }

    .modal {
        align-items: center;
    }

    .modal-card {
        border-radius: 26px;
    }
}
