/* =========================================
   Habits Page (Alışkanlıklar) Stilleri
   ========================================= */

/* Habits Ozet Alani (Stats Boxes) */
.habits-summary-banner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.habits-stat-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 20px 24px;
    transition: transform var(--transition);
}

.habits-stat-box:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.habits-stat-content {
    display: flex;
    flex-direction: column;
}

.habits-stat-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.habits-stat-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.habits-stat-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

@media (max-width: 600px) {
    .habits-summary-banner {
        grid-template-columns: 1fr;
    }
}

.habits-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Habit Card (Row in Grid) */
.habit-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 20px;
    transition: all var(--transition);
}

.habit-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Left: Info */
.habit-info {
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 20px;
}

.habit-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.habit-streak {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.habit-streak svg {
    width: 14px;
    height: 14px;
    stroke: #f59e0b;
}

/* Middle: Days */
.habit-days {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.habit-day-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.habit-day-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.habit-check-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--sidebar-border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: transparent;
    position: relative;
}

.habit-check-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    position: absolute;
}

.habit-check-btn:hover:not(.checked):not(.missed) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.habit-check-btn.checked {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.habit-check-btn.checked .icon-check {
    opacity: 1;
    transform: scale(1);
}

.habit-check-btn.missed {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
    color: rgba(239, 68, 68, 0.6);
}

.habit-check-btn.missed .icon-x {
    opacity: 1;
    transform: scale(1);
}

.habit-check-btn:hover.missed {
    background: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 0.9);
}

/* Right: Actions */
.habit-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    padding-left: 20px;
}

.habit-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.habit-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.habit-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Responsive */
@media (max-width: 900px) {
    .habit-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .habit-info {
        flex: none;
        padding-right: 0;
    }

    .habit-days {
        justify-content: space-between;
    }

    .habit-check-btn {
        width: 36px;
        height: 36px;
    }

    .habit-actions {
        padding-left: 0;
        justify-content: flex-end;
    }
}
