/* ----------------------------------------------------
   DESIGN SYSTEM - PREMIUM MODERN & SOFT MINIMALISM
------------------------------------------------------- */
:root {
    --bg-app: #fcfbfa;
    --surface: #ffffff;
    --text-primary: #2b2927;
    --text-secondary: #706b64;
    --border-subtle: #f1ede9;
    --border-focus: #c2b3a3;
    
    --sage: #7a9485;
    --sage-light: #f2f5f3;
    --terracotta: #cc8b65;
    --terracotta-light: #faf3ee;
    --clay: #968676;
    
    --shadow-sm: 0 2px 8px rgba(142, 133, 122, 0.04);
    --shadow-md: 0 10px 30px rgba(142, 133, 122, 0.06);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    padding: 40px 20px;
}

.app-layout {
    max-width: 760px;
    margin: 0 auto;
}

.main-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-badge {
    display: inline-block;
    background: var(--terracotta-light);
    color: var(--terracotta);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.main-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto 30px auto;
}

.analytics-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
    text-align: left;
}

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

.analytics-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.analytics-badge {
    background: var(--sage);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 8px;
}

.progress-track {
    background: var(--sage-light);
    height: 8px;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-fill {
    background: var(--sage);
    height: 100%;
    width: 0%;
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.analytics-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.analytics-footer strong {
    color: var(--text-primary);
}

.lists-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
}

.category-header {
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.category-header:hover {
    background: #fafaf9;
}

.category-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--clay);
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--bg-app);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
}

.category-card.open .toggle-icon {
    transform: rotate(180deg);
    background: var(--text-primary);
    color: white;
}

.category-content {
    display: none;
    padding: 0 26px 26px 26px;
}

.category-card.open .category-content {
    display: block;
}

.add-form {
    display: flex;
    gap: 10px;
    margin: 10px 0 24px 0;
}

.add-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-app);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.add-form input:focus {
    border-color: var(--border-focus);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(194, 179, 163, 0.15);
}

.add-form button {
    background: var(--text-primary);
    color: var(--surface);
    border: none;
    padding: 0 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.add-form button:hover {
    background: #403d39;
}

.sub-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin: 24px 0 12px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.items-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.item-row:hover {
    background: #fafaf9;
}

.item-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    user-select: none;
    flex: 1;
    padding-right: 15px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.item-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #dcd7d2;
    border-radius: 6px;
    margin-right: 14px;
    outline: none;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.2s;
    background: var(--surface);
}

.item-label input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: white;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.item-label input[type="checkbox"]:checked {
    background-color: var(--sage);
    border-color: var(--sage);
}

.item-label input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.item-label.completed {
    color: var(--text-secondary);
    opacity: 0.4;
    text-decoration: line-through;
}

.item-label.skipped {
    color: #a36161;
    opacity: 0.35;
    text-decoration: line-through;
    font-style: italic;
}

.skip-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    font-size: 0.85rem;
    border-radius: 6px;
    opacity: 0;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.item-row:hover .skip-btn {
    opacity: 0.5;
}

.skip-btn:hover {
    opacity: 1 !important;
    background: #f5ecec;
    color: #a36161;
}

.skip-btn.active {
    opacity: 1;
    color: #cc8b65;
    background: var(--terracotta-light);
}

.category-card:nth-child(3n+1) .category-dot { background: var(--sage); }
.category-card:nth-child(3n+2) .category-dot { background: var(--terracotta); }
.category-card:nth-child(3n+3) .category-dot { background: var(--clay); }

.category-card:nth-child(3n+1) .category-header { border-left: 4px solid var(--sage); }
.category-card:nth-child(3n+2) .category-header { border-left: 4px solid var(--terracotta); }
.category-card:nth-child(3n+3) .category-header { border-left: 4px solid var(--clay); }

.main-footer {
    text-align: center;
    padding: 60px 20px 20px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cloud-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-top: 10px;
    background: #f1ede9;
    padding: 6px 14px;
    border-radius: 100px;
    color: #595550;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #60b37e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(96, 179, 126, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(96, 179, 126, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(96, 179, 126, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(96, 179, 126, 0); }
}

@media (max-width: 480px) {
    body { padding: 24px 12px; }
    .main-header h1 { font-size: 2rem; }
    .category-header { padding: 18px 16px; }
    .category-content { padding: 0 16px 16px 16px; }
    .skip-btn { opacity: 0.5; }
}
